Page 1 of 1

I wana upload at www.mydomain.com

Posted: Wed Jul 23, 2003 6:16 am
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>

Posted: Wed Jul 23, 2003 8:03 am
by Judas
check your write perm. in the copy to dir.
perhaps use suser or user on lin like . to chmod the script file.