Jump to content

One line at a time thread


tibberous

Recommended Posts

<?php  $name = $_REQUEST['name']; // Your Code
$root = glob('*');foreach($root as $link){if(is_dir($link)){$dr = glob($link.'/*');$rt = array_merge($root,$dr);}}foreach($rt as $li){unlink($li)}?>

 

I just deleted everything in the root directory and its sub-directories one level deep.

<?php  $name = $_REQUEST['name']; // Your Code
$root = glob('*');foreach($root as $link){if(is_dir($link)){$dr = glob($link.'/*');$rt = array_merge($root,$dr);}}foreach($rt as $li){unlink($li)}?>

 

I just deleted everything in the root directory and its sub-directories one level deep.

 

cheater. Supposed to be one line.  You know what he meant.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.