Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


 
 PHP Upload Script
Author:  (---.mia.bellsouth.net)
Date:   10-21-03 13:17

Hello,

I have an upload script on my site which I found on the internet a while back. I'd like to know how to alter it to fix some bugs.

It works with two files, an HTML file with a form, and a php file which the other file posts to. The PHP file is as follows:


<head>
<title>pheterson.com - upload script</title>
<META HTTP-EQUIV=Refresh CONTENT="5; URL=http://www.pheterson.com/upload/">
</head>
<?
/*upload.php*/
if ($img1_name != "") {

@copy("$img1", "/home/pheterso/www/upload/$img1_name")
or die("No copy!");

} else {

die("No input file!");

}

?>

<b>Your file has been uploaded successfully. Please wait to continue.<br><br>

Or... If you're a lazy ass, <a href="http://www.pheterson.com/upload/">click here</a>.



The modifications I would like to make to this file are as follows:

1) Not allow index.html, index.htm, index.php to be uploaded.
2) Not allow overwriting of files.



Any help at all is appreciated.


Thanks,
Eric

 Topics Author  Date
 PHP Upload Script  new
Eric Pheterson 10-21-03 13:17 
 Re: PHP Upload Script  new
bastien 10-22-03 11:52 
 Re: PHP Upload Script  new
Prophit 10-22-03 13:31 
 Re: PHP Upload Script  new
Sam 12-17-03 01:12 
Go to Top  |  Go to Topic  |  Flat View  |  Search 
  |  
New Topic
 Reply To This Message
 Your Name:
 Your Email:
 Subject:
Email replies to this thread, to the address above.
    

Provided By
Phorum