Executing php inside php example

1. Create a index.php,

echo "welcome to javadomain.in";

2. Create a ExecPHP.php,

echo exec("D:\\xampp\\php\\php.exe D:\\xampp\\htdocs\\index.php");

D:\\xampp\\php\\php.exe is the location of the php in the tested machine.If you have set the environment path, then you can run directly,
echo exec(“php.exe D:\\xampp\\htdocs\\index.php”);

Recommended Books:

393 total views, 1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *