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

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -