run php script
Moderator: General Moderators
run php script
I'm trying to run php scripts from within php scripts.Its a series of scripts that launch each other once they complete execution.But since they're in a loop,my browser stops execution saying it'll loop non stop.I use header() to do this.Is there a way to make my browser keep executing no matter what?
You can use fopen:
You also can send to "myfile.php" arguments, "myfile.php?id=1".
Code: Select all
<?php
$handle = fopen("http://myhost.com/myfile.php", "r");
$content = "";
while(!feof($handle))
{
$content = fread($handle, 4096);
}
fclose($handle);
echo $content; //The result of "myfile.php" execution
?>