I wana upload at www.mydomain.com

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
altamash
Forum Newbie
Posts: 8
Joined: Mon Jul 21, 2003 6:03 am

I wana upload at www.mydomain.com

Post by altamash »

using the following code I can copy "$userfile" to "C:\apache\htdocs\Php\Upload/tasdif.gif" But I wana copy "$userfile" to

"C:\apache\htdocs\Php\Upload\" with the origional name
Aslo I wana copy "$userfile" to "http://www.mydomain.com/uploads/" but copy($userfile,

"http://www.pakistancare.com/uploads/BACKGRND.GIF");
is not working
can Some body help me


<html>
<?

if(!empty($userfile)) {

//copy the file
copy($userfile, "C:\apache\htdocs\Php\Upload/tasdif.gif") or die("Soory"); //working

//destroy the uploaded file
unlink($userfile);

//display message
echo("file uploaded");

}
?>
</html>
Judas
Forum Commoner
Posts: 67
Joined: Tue Jun 10, 2003 3:34 pm
Location: Netherlands

Post by Judas »

check your write perm. in the copy to dir.
perhaps use suser or user on lin like . to chmod the script file.
Post Reply