i am new to exec function and need help with executing an external php file. My code of the files are as follows
Script.php(main file) :
<?php
$path = 'C:/xampp/htdocs/user/execute.php';
exec($path, $output,$return);
var_dump($return);
echo "hi"."<br>";
echo "end";?>
execute.php(calling file) :
for($i=0;$i<10;$i++){
echo "hello"."<br>";
}
trying to execute the calling file
exec()just include the file?!exec('php ' . $path, $output, $return);You may need to changephpto the full path of the executable.