易截截图软件、单文件、免安装、纯绿色、仅160KB

crontab跑PHP脚本的问题 - PHP / 开源资源

如果在命令行,PHP脚本可以正常运行.

但是如果放到crontab中会运行到一半就退出,感觉好像是时间片不够.
但在网上又找不到有关crontab时间片的定义.


startParser.sh:
cd /usr/local/clientreport
php /usr/local/clientreport/parser/entry.php &


crontab:
58 11 * * * root sh /usr/local/clientreport/startParser.sh &

entry.php:
<?php
require_once 'fileparser.php';
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
$object = new FileParser;
$object->parserFile();
?>
~

不知道为什么entry.php总是执行到一半就退出.

php代码应该是没有问题的.求解.....
加上set_time_limit(0); 呢?

PHP code:
set_time_limit(0);


出错了,楼主。


要包含的文件 的 require/include 裏 用絕對路徑, 不能用相對路徑

报什么错了?帖出来啊.

引用
要包含的文件 的 require/include 裏 用絕對路徑, 不能用相對路徑

有可能是这个原因

58 11 * * * root sh cd /usr/local/clientreport/parser && php entry.php 

你可以试试,不知道对不对.

58 11 * * * root cd /usr/local/clientreport/parser && php ./entry.php &n


相关问答:

诚招有经验的PHP工程师(可兼职) - PHP / 基础编程

1.精通面向对象的设计和开发;
2.熟练使用PHP语言(5.0+)进行数据库,网络通信,文件读写,安全机制等开发;
3.熟练使用MYSQL(5.0+)数据库开发,包括基本的数据库设计/优化/安全,复杂的T-SQL语句编写,熟练编写MYS ......

问一个PHP和smarty的日期问题 - PHP / 基础编程

index.php内容:
  $smarty->assign('name',strtotime('-0'));
  $smarty->display("index.html");
index.html内容:
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......

php网站发布问题! - PHP / 基础编程

菜鸟求救!!
  现在我手头有一个php+oracle的网站。。服务器是linux系统
  
  请各位告诉我如何发布。。。我是新手。谢谢了!!
安装一个apache,把php文件放到apache的发布目录下, ......

php如何获取当前页地址栏的URL地址 - PHP / 开源资源

就是我在某个网页插入了一个php链接
我想获得那个网址地址地址栏的url而且要输出txt格式或其他格式。应该如何实现???
还有就是写入到.txt 文件里,怎么去判断是否重复。
$_sever[request_uri]


楼主给点分 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号