找回密码
 开放注册

QQ登录

只需一步,快速开始

微信登录

微信扫码,快速开始

通达OA官网网站
搜索
查看: 2523|回复: 6

定时任务PHP脚本程序的引用问题

[复制链接]

23

主题

24

回帖

182

牛毛

游客

积分
229
发表于 2015-10-12 14:14:42 | 显示全部楼层 |阅读模式
定时任务PHP脚本程序的引用问题

PHP脚本程序中引用 include_once("./auth.php"); 会在php_errors.log中出现报错

PHP Warning:  include_once(): Failed opening './auth.php' for inclusion (include_path='.;D:\MYOA\webroot') in D:\MYOA\webroot\task\device inf 6.php on line 3

但不影响脚本正常运行

如果按照通达二次开发手册上引用 include_once("inc/auth.inc.php"); 日志中不会报错 但脚本不会执行 并且数据库中 offcie_tast 表相应任务 EXEC_MSG 列会显示 “?PHP Execute Error”


121

主题

5374

回帖

8160

牛毛

游客

积分
12838
发表于 2015-10-12 15:46:40 | 显示全部楼层
您好,文件是在task目录下的话,写法改成这样include_once("../auth.php"); 或者按这种写法include_once(realpath(dirname(__FILE__)."/../")."/auth.php");

23

主题

24

回帖

182

牛毛

游客

积分
229
 楼主| 发表于 2015-10-12 16:37:28 | 显示全部楼层
通达薛海棠 发表于 2015-10-12 15:46
您好,文件是在task目录下的话,写法改成这样include_once("../auth.php"); 或者按这种写法include_once(re ...

[12-Oct-2015 16:36:32 PRC] PHP Warning:  include_once(): Failed opening '../auth.php' for inclusion (include_path='.;D:\MYOA\webroot') in D:\MYOA\webroot\task\device inf 6.php on line 3

121

主题

5374

回帖

8160

牛毛

游客

积分
12838
发表于 2015-10-12 17:41:04 | 显示全部楼层
您好,这么写试试:include_once ("task/auth.php");

23

主题

24

回帖

182

牛毛

游客

积分
229
 楼主| 发表于 2015-10-13 09:17:37 | 显示全部楼层
通达薛海棠 发表于 2015-10-12 17:41
您好,这么写试试:include_once ("task/auth.php");

Office_task.log 报错
执行异常:<!DOCTYPE html>
<!--[if IE 6 ]> <html class="ie6 lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 6 ]> <html class="lte_ie6 lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 7 ]> <html class="lte_ie7 lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 8 ]> <html class="lte_ie8 lte_ie9"> <![endif]-->
<!--[if lte IE 9 ]> <html class="lte_ie9"> <![endif]-->
<!--[if (gte IE 10)|!(IE)]><!--><html><!--<![endif]-->
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/static/theme/1/style.css" />
    <!--[if lte IE 8]>
        <script type="text/javascript" src="/static/js/ccorrect_btn.js"></script>
    <![endif]-->
   
<script type="text/javascript" >
   var MYOA_JS_SERVER = "";
   var MYOA_STATIC_SERVER = "";
</script>
</head>

数据库office_task表报错 PHP Execute Error
但是脚本运行没有问题 到达设定时间后运行正常

点评

您好,提供一下您的QQ,具体看下吧。  详情 回复 发表于 2015-10-14 09:24

121

主题

5374

回帖

8160

牛毛

游客

积分
12838
发表于 2015-10-14 09:24:59 | 显示全部楼层
jenniferamazing 发表于 2015-10-13 09:17
Office_task.log 报错
执行异常:
   

您好,提供一下您的QQ,具体看下吧。

3

主题

30

回帖

124

牛毛

游客

积分
157
发表于 2017-7-21 15:38:56 | 显示全部楼层
这样应该没啥问题:include_once ("task/auth.php");

我设置在别的目录都可以执行成功。
您需要登录后才可以回帖 登录 | 开放注册

本版积分规则

咨询电话:400 818 0505 通达OA,国内协同管理软件行业内唯一的央企单位,中国协同OA软件的领跑者,优秀协同办公解决方案供应商

帮助|Archiver|小黑屋|通信管理局专项备案号:[2008]238号|由NB5牛论坛提供技术支持NB5社区 ( 皖ICP备08004151号;皖公网安备34010402700514号 )

GMT+8, 2025-4-28 11:12 , Processed in 0.180095 second(s), 59 queries .

Powered by Discuz

Copyright © 2001-2025, 北京通达信科科技有限公司.

快速回复 返回顶部 返回列表