note 51556 added to function.ftp-delete

From: Date: Mon, 04 Apr 2005 05:37:40 +0000
Subject: note 51556 added to function.ftp-delete
Groups: php.notes 
Request: Send a blank email to php-notes+get-87413@lists.php.net to get a copy of this message
You can make a script delete itself with ftp_delete! It's pretty useful when creating an install script which you want to destroy at the end of the installation to prevent it from being run later. On Linux machines, very often the user uploads third party scripts, and gets asked to CHMOD this and delete that manually because the webserver user is different from the FTP user ; make them enter their FTP info and get rid of the tedious file manipulation step! Be careful, though. You will need to flush the output buffer and call ftp_delete at the end of the script, or else the script will die before it fully executes. Look up ob_end_flush for more info. ---- Manual Page -- http://www.php.net/manual/en/function.ftp-delete.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51556 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51556&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51556&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51556&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51556&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51556&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51556&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87413) next »