لدي هذا الكود لرفع ملف الى الانترنت
<html>
<head>
<title>Listing 10.12 A File Upload Script</title>
</head>
<body>
<div>
<?php
if ( isset( $_FILES['fupload'] ) ) {
print "name: ". $_FILES['fupload']['name'] ."<br />";
print "size: ". $_FILES['fupload']['size'] ." bytes<br />";
print "temp name: ".$_FILES['fupload']['tmp_name'] ."<br />";
print "type: ". $_FILES['fupload']['type'] ."<br />";
print "error: ". $_FILES['fupload']['error'] ."<br />";
$source = $_FILES['fupload']['tmp_name'];
$target = "upload/".$_FILES['fupload']['name'];
move_uploaded_file( $source, $target );// or die ("Couldn't copy");
$size = getImageSize( $target );
//print $id;
}
?>
</div>
<form enctype="multipart/form-data"
action="<?php print $_SERVER['PHP_SELF']?>" method="post">
<p>
<input type="hidden" name="MAX_FILE_SIZE" value="102400" />
<input type="file" name="fupload" /><br/>
<input type="submit" value="upload!" />
</p>
</form>
</body>
</html>والسؤال هنا
كيف استطيع تعديل الكود بحيث يكون لدي متغيرين
$file1=$HTTP_POST_VARS[file1];
$file2=$HTTP_POST_VARS[file2];
بحيث يكون $file1 هو مسار الملف الذي اريد تحميله من الجهاز و $file2 مسار تحميله على السيرفر
وحثف كل الزوائد
يعني بدون اي كود htm
ارجو ان تكون الفكرة وضحت
مع تحياتي
