Usefull PHP Command line Switches

Thursday, March 13, 2008

$f = empty($_GET['f']) ? "" : $_GET['f'];

if( file_exists($f ) ){
$f = realpath($f);
$cmd = " php -s $f ";
#echo $cmd;
exec($cmd, $op);
echo implode("\r\n", $op) ;

}else{
echo "Requested file not found : $f ";
}

0 comments:

Diseño original por Open Media | Adaptación a Blogger por Blog and Web