日期:2014-05-17  浏览次数:20357 次

linux下用php脚本调用另一个php脚本
这个linux空间就只有ftp权限开放给我~~现在想写一个脚本first.php来定时执行second.php
执行second.php不知道怎么写~~


first.php

ignore_user_abort(TRUE);// 设定关闭浏览器也执行程序 
set_time_limit(0);      // 设定响应时间不限制

while (TRUE) {   

//这里的执行second.php不知道怎么写~~~求指点~谢谢

sleep(86400)

------解决方案--------------------
如果是想执行second.php ; 直接调用exec或者system。
如果只是想require 或者include,建议在while 外面做。