Hy ,

I’m trying to delete a file after I wrote in, and read it.
I’m connected as $user in his home directory.
The create and read are working.
But for the delete is giving me as if the file not exist.
What is wrong ?
( php3, apache)

//create ok
 $mesg = « text « ;
 $file="ftp://$user:$pass@$server/directory/text.txt";;
 $filehandle=fopen($file,"w");
 fputs($filehandle,$mesg,strlen($mesg));
 fclose($filehandle);

//read ok


$fileR = "ftp://$user:$pass@$server/directory/text.txt";;
$fp = @fopen($fileR,"r");
if($fp)
{
while (!feof ($fp)) {
$buffer = fgets($fp, 4096);
echo $buffer;
}

fclose($fp);
}


//delete file :-((


 $file = "ftp://
$user:$pass@$server/directory/text.txt";
 unlink($file);


Warning: Unlink failed (No such file or directory)


======

Thanks,
Misica
______________________________________________________
Boîte aux lettres - Caramail - http://www.caramail.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to