I am trying to write a real simle script that uploads a pic from the clients pc to my sevrer.
The form seems ok. The address to the pic is stored in $pic1.
The handler script looks like this...
Code: Select all
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
$pic1 = stripslashes($pic1);
echo "pic1 = $pic1 <br>";
echo "root = $root <br>";
copy ("$pic1", '$root/SuperAd/MembersArea/temp_pics/$t_pic1' )
or die ("Could not copy file" );
echo "pic1_name = $pic1_name <br>";
echo "pic1_size = $pic1_size <br>";
echo "pic1_type = $pic1_type <br>";
?>Any ideas?Warning: copy(C:\*****\calvin.gif): failed to open stream: No such file or directory in /*****/premium_handler.php on line 15
Could not copy file
Thanks
Lawrence.