How to use the unlink function?
Posted 10 October 2006 - 08:21 AM
Posted 10 October 2006 - 08:41 AM
as long as you have permission to delete the file you can just call
<?php $filename = "/tmp/ictmovie.txt"; unlink($filename);
From a web-page the user is something like "apache" or "www-data" so its not "root" therefore you may not have permission to delete the file if its owned by root. If you are running an MS server, im not suer how the persmissions work but you need to check in IIS or Apache (whatever your web-server is).
Posted 10 October 2006 - 10:46 AM
Will I need to set permissions then? Alsonin regards to the $filename = "/tmp/ictmovie.txt"; peice of code. I have the ictmovie.mov stored in a MYSQL database and when the user clicks deletes I want it to find the name of the file from the database, go to the fodler and delete it, is this possible with unlink?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users