Originally Posted by
robothy
Hi,
Surely the FTP will map your public_html folder, within which will be your PHP scripts. So can you not simply use the unlink function in PHP?
Sorry if I am over simplifying the problem.
R
unlink() function in PHP will be run under the Apache user, however, you can have FTP run under any user as long as you have their authentication details.
ie: If you use unlink(), it will not unlink from FTP session, it will unlink from the PHP process.
this code is not able to find the old.txt,but this file is placed in the same directory where the script is located.
When you log into FTP it will most likely put you into the user directory of the user that authenticates, or keep you in the public ftp directory (may also depend on the ftp application running on the server and settings). You will not be placed into the directory your script is in.
So you will have to log in via FTP, then change the directory to the folder your script is in.
http://www.php.net/manual/en/function.ftp-chdir.php www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!