note 32867 deleted from function.unlink by aidan

From: Date: Wed, 08 Sep 2004 11:39:29 +0000
Subject: note 32867 deleted from function.unlink by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76227@lists.php.net to get a copy of this message
Note Submitter: jsvlrt @t yahoo (dotcom) ---- in response to rich at pulse8design dot com; also, if, for instance you were calling system('rm /home/foo.bar'); and the script was later moved to a windows server, this line would need to be changed as the rm command only exists on un*x, however, unlink would still work, providing the paths were the same, I use something like; config.php: <? define('SERVER_PATH_TO_WEB_ROOT','/home/httpdoc/foo',FALSE); ?> deleter.php: <? include('config.php'); unlink(SERVER_PATH_TO_WEB_ROOT."/myfile.bar"); ?> this way, I only have to change one setting if the server structure changes, and I don't need to worry about un*x / windows issues (as much)

« previous php.notes (#76227) next »