Jump to content

Crs

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Crs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Crs

    Deleting files

    ok, so you were right about the space. now it seems to be ok, I get no error from the script, but the files don't get deleted. Any ideas ? Is it ok to use the unlink function ?
  2. Crs

    Deleting files

    $command = "rm -rf".$path."*"; -no space and the $path and $command are ok
  3. Crs

    Deleting files

    # rm --help -r, -R, --recursive remove directories and their contents recursively the two options are the same
  4. Hi, I gave the following php script: #!/usr/bin/php -f <?php require_once(dirname(dirname(__FILE__))."/modules/common/common.config.inc.php"); $path = $conf["root"]."/media/images/tricouri/tmp/"; $command = "rm -Rf".$path."*"; if(exec($command)) { echo "Folder cleared\n"; } else { echo "Folder clear failed\n"; } ?> I want to delete some .png files from the ./tmp folder and I receive a rm error: The rm -rf command sintax is ok on the linux bash, but from php i receive the error. Php safe mode is off. Can someone help, please ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.