Execute Linux commands in PHP

Posted under » PHP » Linux on 04 February 2010

You can execute linux commands within a php script - all you have to do is put the command line in backticks (`).

To show the date...

<¿php
#show date using linux command
echo `date +%D-%T`;
?>

We used to write perl scripts for this purpose but PHP is faster.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data