another quick one
i'm using this code in a form to call a php file to upload a file to a specified folder, which is writable
input type="hidden" name="MAX_FILE_SIZE" value="25000">
p>strong>File to Upload:/strong>
input type="file" name="our_file" size="30"></p>
i took out the opening part of tags, i'm too lazy to edit the code to view through html right now (been coding for the last 10 hours almost)
and here's the php i use to do the rest
$our_file = $_FILES['our_file']['name']; if ($our_file != "") { copy($our_file, "userpic/".$our_file) ;//or die("Couldn't Upload the file!"); } else { die("No input file specified"); } ?>
html>
head>
title>Successful File Upload!/title>
body>font face=verdana size=2>
B>Success!</b>
P>You sent: echo "$our_file"; ?>, a echo "$our_file_size"; ?>
byte file with a mime type of echo "$our_file_type"; ?>.</p>
/font>/body>
/html>
right now i'm getting a "
Warning: copy(kersin.gif): failed to open stream: No such file or directory in /Users/oldskool/Sites/beta/sql/upload_fi le.php on line 8" error
which i have no idea what it means
i got this code from a website, tried copy pasting it directly, and it didn't work, it would just die and say "no input file" or whatever
global variables is on
folder is writable
whats going on?
i'm using this code in a form to call a php file to upload a file to a specified folder, which is writable
input type="hidden" name="MAX_FILE_SIZE" value="25000">
p>strong>File to Upload:/strong>
input type="file" name="our_file" size="30"></p>
input type="submit" name="submit" value="Upload File">
i took out the opening part of tags, i'm too lazy to edit the code to view through html right now (been coding for the last 10 hours almost)
and here's the php i use to do the rest
$our_file = $_FILES['our_file']['name']; if ($our_file != "") { copy($our_file, "userpic/".$our_file) ;//or die("Couldn't Upload the file!"); } else { die("No input file specified"); } ?>
html>
head>
title>Successful File Upload!/title>
body>font face=verdana size=2>
B>Success!</b>
P>You sent: echo "$our_file"; ?>, a echo "$our_file_size"; ?>
byte file with a mime type of echo "$our_file_type"; ?>.</p>
/font>/body>
/html>
right now i'm getting a "
Warning: copy(kersin.gif): failed to open stream: No such file or directory in /Users/oldskool/Sites/beta/sql/upload_fi
which i have no idea what it means
i got this code from a website, tried copy pasting it directly, and it didn't work, it would just die and say "no input file" or whatever
global variables is on
folder is writable
whats going on?
