Reply
upload script
Old 07-04-2004, 05:05 PM upload script
Junior Talker

Posts: 2
Location: indiana
i need a simple upload script and can't seem to find one.. i've downloaded all kinds of them over the past few days and the only ones that seem to get close to working are the php ones... but, the instructions for installation must be missing some magical word, because none of them so far have worked...

This one gets me an error message that says something is wrong on line 9 ... any suggestions?

<?
$uploadNeed = $_POST['uploadNeed'];
// start for loop
for($x=0;$x<$uploadNeed;$x++){
$file_name = $_FILES['uploadFile'. $x]['name'];
// strip file_name of slashes
$file_name = stripslashes($file_name);
$file_name = str_replace("'","",$file_name);
$copy = copy($_FILES['uploadFile'. $x]['tmp_name'],$file_name);
// check if successfully copied
if($copy){
echo "$file_name | uploaded sucessfully!<br>";
}else{
echo "$file_name | could not be uploaded!<br>";
}
} // end of loop
?>

Vivvy
Vivvy is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-04-2004, 05:29 PM
celticbrue's Avatar
Extreme Talker

Posts: 175
Location: Wiltshire, England
Hi Vivvy,

Take a look at my answer This Post. It contains more info than you probably need but also a very simple file upload script.

Hope this helps.

Ian.
celticbrue is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to upload script
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11416 seconds with 12 queries