php调用linux程序的并发执行
时间:2007-08-15 来源:wuruichang
test.php
#!/usr/bin/php -q
system("./a.php {$value} >/dev/null &");
$end = gettimeofday();
$runtime = 1000000*($end[sec]-$begin[sec]) + $end[usec] - $begin[usec];
printf("\n[runtime]\n\n");
printf("time = %ds,%dms\n",$runtime/1000000,($runtime/1000) - floor($runtime/1000000)*1000);
}
?>
a.php
#!/usr/bin/php -q
> {$filename}");
}
?>
#!/usr/bin/php -q
system("./a.php {$value} >/dev/null &");
$end = gettimeofday();
$runtime = 1000000*($end[sec]-$begin[sec]) + $end[usec] - $begin[usec];
printf("\n[runtime]\n\n");
printf("time = %ds,%dms\n",$runtime/1000000,($runtime/1000) - floor($runtime/1000000)*1000);
}
?>
a.php
#!/usr/bin/php -q
> {$filename}");
}
?>
相关阅读 更多 +
排行榜 更多 +