View Single Post
ישן 15-08-06, 11:17   # 8
Green
חבר פורום
 
מיני פרופיל
תאריך הצטרפות: Jul 2006
הודעות: 89

Green לא מחובר  

קוד:
<html>
<body>

<?php
print $file1 // ידפיס את הקובץ הזמני של input file1
print $file1_name // יחזיר את השם של הקובץ
print $file1_size // יחזיר את גודל הקובץ בבתים
print $file1_type // מחזיר סוג הקובץ
?>

<?php
if ($file1 !== "")
{
   move_uploaded_file( $file1 , "public_html/".$file1_name );
   print "הקובץ נשתמש בשרת , <a href=\"public_html/".$file1_name."\">uploads/".$file1_name."</a>";
}else{
   print "לא נשלח קובץ";
}
?> 

</html>
<body>
קובץ הHTML

קוד:
<form action="upload.php" method="post" enctype="multipart/form-data"><br>
<input type="file" name="file1"><br> 
<input type="submit" value="upload !"><br> 
</form><br>
העברתי את שני הקבצים לשרת,ולא עובד. אני לא מצליח לפתוח את קובץ הPHP גם.
  Reply With Quote