Show executed command and output using PHP exec() -


i debugging script supposed delete file , love know if there way echo command running along results:

echo exec("rm ./" . strtolower(end(split('\/',$originalname))));

this return result, incoming data (which should like:/plugins/dropzone/files/xcqzr.png) great know getting passed it. know in separate process, wondering if there built in way.

you compose command string beforehand , pass exec().

$command = "rm ./" . strtolower(end(split('\/',$originalname))); echo 'command: '.$command.php_eol; $result = exec($command); echo 'result: '.$result.php_eol; 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -