Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-10-2004, 01:17 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
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">
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net.
Free Teamspeak servers: http://gamersnetwork.us/

Reply With Quote
  #2  
Old 12-10-2004, 05:36 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,966

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
Reply With Quote
  #3  
Old 12-10-2004, 06:03 PM
BeBop is offline BeBop
Registered User

Join Date: Jun 2002
Posts: 600

Send a message via ICQ to BeBop Send a message via AIM to BeBop Send a message via Yahoo to BeBop
ooh panther i love you (again) could this be why the LOAD_FILE thing wasnt working also?
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net.
Free Teamspeak servers: http://gamersnetwork.us/

Reply With Quote
  #4  
Old 12-12-2004, 10:06 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,966

yes
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -5. The time now is 04:20 PM.




Powered by vBulletin®