hi,
i have the following script to dowload upload file into a webserver
I know i don't need copy but i used it to know if this way works or not
$att = $_FILES['att']['name'];
$temp = $_FILES['att']['tmp_name'];
if($att){
$uploadfile = $uploaddir.$att;
print "yo GOT $att and temp is $temp, and $uploadfile<br>";
copy("$temp", "$uploadfile");
if (!move_uploaded_file($temp, $uploadfile)){
print "Error can not upload file <br>";
}
and here is the output
yo GOT CC.xls and temp is /tmp/phprHKPjk, and
/home/cm7uk/public_html/emaillist/attach/CC.xls
Warning: open_basedir restriction in effect. File is in wrong directory in
/home/cm7uk/public_html/emaillist/sending.php on line 13
Warning: Unable to create '
/home/cm7uk/public_html/emaillist/attach/CC.xls': No such file or directory
in /home/cm7uk/public_html/emaillist/sending.php on line 14
Warning: Unable to move '/tmp/phprHKPjk' to '
/home/cm7uk/public_html/emaillist/attach/CC.xls' in
/home/cm7uk/public_html/emaillist/sending.php on line 14
Error can not upload file
Warning: Cannot add header information - headers already sent by (output
started at /home/cm7uk/public_html/emaillist/sending.php:11) in
/home/cm7uk/public_html/emaillist/sending.php on line 65
any help is appreciated thanx
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php