I have founda that trying to delete a file using relative path like the example below does not work.
$do = unlink("../pics/$fileToDel");
if($do=="1"){
echo "The file was deleted successfully.";
} else { echo "There was an error trying to delete the file."; }
I did not work at all, instead what I had to do was:
chdir('../pics/');
$do = unlink($fileToDel);
if($do=="1"){
echo "The file was deleted successfully.";
} else { echo "There was an error trying to delete the file."; }
Then it worked !
----
Server IP: 200.185.126.110
Probable Submitter: 201.6.33.208
----
Manual Page -- http://www.php.net/manual/en/function.delete.php
Edit -- https://master.php.net/note/edit/80110
Del: integrated -- https://master.php.net/note/delete/80110/integrated
Del: useless -- https://master.php.net/note/delete/80110/useless
Del: bad code -- https://master.php.net/note/delete/80110/bad+code
Del: spam -- https://master.php.net/note/delete/80110/spam
Del: non-english -- https://master.php.net/note/delete/80110/non-english
Del: in docs -- https://master.php.net/note/delete/80110/in+docs
Del: other reasons-- https://master.php.net/note/delete/80110
Reject -- https://master.php.net/note/reject/80110
Search -- https://master.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.