Re: delete files from a directory
| From: | Chris Hayes | Date: | Tue, 17 Jun 2003 15:02:09 +0000 |
| Subject: | Re: delete files from a directory | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-151847@lists.php.net to get a copy of this message | ||
At 16:42 17-6-03, you wrote:
Hi, i need to delete all the files that are stored in a dir.....i had try with this and nothing happen... passthru ("del $path_adjuntos.$idprod/*.* /q");1) http://www.php.net/passthru: "This function should be used in place of <http://nl.php.net/manual/en/function.exec.php>exec() or <http://nl.php.net/manual/en/function.system.php>system() when the output from the Unix command is binary data which needs to be passed directly back to the browser. " Is that the case? 2) check http://nl3.php.net/manual/en/function.unlink.php, this function might be more appropriate 3) what do you see when you echo "del $path_adjuntos.$idprod/*.* /q"; does it look right? 4) if you use exec, try to see the error message, suggested by Carlitos on http://nl.php.net/manual/en/function.exec.php: The code looked broken but maybe you can fix it.