|
Web design and Programming Discuss website creation and other programming topics. |
![]() |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
PHP: move_uploaded_file()
if ("image/pjpeg" == $_FILES['userfile']['type'] || "image/jpeg" == $_FILES['userfile']['type'] || "image/gif" == $_FILES['userfile']['type'])
{ $sigs = "/home/gamnet/www/mapdb/"; $uploadfile = $sigs . $_FILES['userfile']['name']; move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile); $img = $_FILES['userfile']['name']; $name = $_FILES['userfile']['name']; $debug = $_FILES; echo $name; @chmod("/home/gamnet/www/mapdb/".$name, 0777); print "File is valid, and was successfully uploaded."; print_r($_FILES); echo "File couldnt be uploaded. <b>Debug:</B><br>"; print_r($_FILES); } Why on earth does that not work... ive tried everything i can think of and it stll wont upload the dang file... and the directory mapdb is CHMOD 777 just so you know, heres the form its getting the file from <strong>Name:</strong> <input name="name" type="text" maxlength="50"><br> <strong>Author: </strong><input name="author" type="text" maxlength="50"><br> <strong>Description:</strong> <input name="description" type="text" maxlength="255"><br> <strong>Map (.zip):</strong> <input name="map" type="file"><br> <strong>Screenshot (.gif or .jpg):</strong> <input name="userfile" type="file"><br> <input name="submitmap" type="submit" value="Submit Map for Approval">
__________________
![]() Free Teamspeak servers: http://gamersnetwork.us/ ![]() |
#2
|
||
|
Are you sure you have a: <form method="POST" enctype="multipart/form-data" action="URL" name="form">
in your form?
__________________
![]() 04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
#3
|
||
|
ooh panther i love you (again) could this be why the LOAD_FILE thing wasnt working also?
__________________
![]() Free Teamspeak servers: http://gamersnetwork.us/ ![]() |
#4
|
||
|
yes
__________________
![]() 04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Well it's PHP but....What do u think | MadMan TCO | Web design and Programming | 18 | 03-09-2005 08:25 PM |
Php Help!! | navysea| | Web design and Programming | 3 | 03-04-2005 06:27 PM |
PHP-NUKE and PHP | ~BLÃÐE~ | phphq.Net Forums | 9 | 01-19-2005 06:49 AM |
PHP | atholon | Web design and Programming | 16 | 07-21-2004 09:17 AM |
php anyone? | Surge | Web design and Programming | 7 | 07-26-2003 11:04 AM |