delete file php linux
hi,
i wanna ask on how to delete a file or a certain file in linux by using php or in other word by using web browser. example i want to delete the file inside /var/www/cgi-bin/ with browser. thank you. Kind regards, Athrin |
the remove command in linux is
Code:
rm -f /var/www/cgi-bin/somefile if you do want that he asks you that, just leave it out but for deleting a file through a website...? don't know, try experimenting with that |
i already experiment with
Code:
1.system('rm -f /var/www/cgi-bin/delete.sh') |
are those folders accessible?
|
Quote:
|
check that pls ;)
normally it should have you made your scripts executable? Code:
chmod 755 delete.sh |
Quote:
|
euhm.. yes, but you can also check it with
Code:
ls -l Code:
-rwxr-xr-x 1 root root 7422 Apr 28 07:44 delete.sh but i also mean if the folders are accessible I don't think that are the problems, but it's worth checking |
yup.. its accessible.
Quote:
|
have you tried this
are you working on a Linux system or on a Windows system and working through PuTTy (or something else) |
Quote:
|
okay, but have you tried that link i showed you?
|
when i tried this from the link that you just give
Code:
$myFile = "delete.sh"; that mean my file cant be opened.. =_=. then ofcourse cant use unlink.. |
try to run your file on your host (not through your website)
and put some echo's or things in your script that shows you where he get stuck (debug it...) |
Quote:
Quote:
|
All times are GMT -5. The time now is 04:22 PM. |