Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Posts: 2
Location: indiana
Trades: 0
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
 
 
Register now for full access!
Old 07-04-2004, 06:29 PM
celticbrue's Avatar
Extreme Talker

Posts: 175
Location: Wiltshire, England
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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
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.11160 seconds with 12 queries