
05-10-2007, 18:20
|
|
|
|
חבר מתאריך: 21.01.06
הודעות: 813
|
|
מצאתי גם בחיפוש עוד משהו, שהוא כמו השגיאה שלי, והתיקון היה כזה:
קוד PHP:
<? $upload_to = "/Ben/newchat/uploaded/"; $upld_form = " <form enctype='multipart/form-data' action='".$_SERVER['PHP_SELF."']."' method='post'> <input type='file' name='upld_file'/> <input type='submit' name='send_file' value='send'/> </form>"; echo $upld_form; if(isset($_POST['send_file'])){ $filesource=$_FILES['upld_file']['tmp_name']; $filedest =$upload_to.$_FILES['upld_file']['name']; if(move_uploaded_file($filesource,$filedest)){ echo "File uploaded successfuly."; header("Location: ".$_SERVER['PHP_SELF."']); }else{ echo "Error uploading file."; } } ?>
וזה מחזיר לי Error uploading file. אבל בלי שגיאה נוספת..
אגב, יכול להיות שהdir שאני שם לא נכון?
כשיש שגיאה בשרת זה נראה ככה:
/mounted-storage/home20a/sub001/sc19971-UEHW/www/y0gz/xpein/Ben/newchat/uploaded/
הכתובת שבה נמצאת העלאה נראית ככה:
http://y0gz.com/xpein/Ben/newchat/
ולאיפה שעולים הקבצים זה ככה:
http://y0gz.com/xpein/Ben/newchat/uploaded/
כשאני נכנס לשרת דרך הflashfxp
יש לי שם את התיקייה Ben אחריה newchat ושם נמצאת העלאה והקבצים עוברים לתיקייה uploaded..
אז עשיתי ככה:
/Ben/newchat/uploaded/
אם זאת לא הבעיה, אז מה הבעיה?
אני כבר משתגע מהעלאות האלה, כל הקודים שבעולם לא מצליחים לי..
_____________________________________
--- ! Area Close ! ---
|