try

<?php
if (copy($f1,"upload.txt"))
 {
  echo "<b>Upload successfully";
  $fname=substring (strrchr($f1_name,"\\"),1);
 }
unlink ($f1);
?>

also the substring() function does not exist until unless you have written
it yourself for the code. The standard function is substr().

hope that helps

regards

Ankur Verma
New Delhi
India

-----Original Message-----
From: JoshuaHu [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 16, 2001 9:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] file upload failed....:(


I use PHP 4.04p11 on Apache.
But my upload.php can't work...
f1 is the name of file-upload-variable....

<?php
if (copy($f1,"upload.txt"))
 {
  echo "<b>Upload successfully";
  $fname=substring (strrchr($f1_name,"\"),1);
 }
unlink ($f1);
?>

The browser returns
    Parse error: parse error in c:/inetpub/php_root/upload.php on line 8
Can anyone tell me where I make mistake...
thanks a lot....



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to