thinkphp下创建一个项目老是失败 php版本5.0
在www文件下orange文件下创建index.php编辑文本如下<?phpdefine('APP_DEBUG',true);//开启调试模式require('../th...
在www文件下orange文件下创建index.php
编辑文本如下
<?php
define('APP_DEBUG',true); //开启调试模式
require('../thlinkphp/public/index.php');
?>
打开网址运行出现错误代码
Warning: require(../thlinkphp/public/index.php): failed to open stream: No such file or directory in D:\phpStudy\WWW\orange\index.php on line 3
Fatal error: require(): Failed opening required '../thlinkphp/public/index.php' (include_path='.;C:\php\pear') in D:\phpStudy\WWW\orange\index.php on line 3 展开
编辑文本如下
<?php
define('APP_DEBUG',true); //开启调试模式
require('../thlinkphp/public/index.php');
?>
打开网址运行出现错误代码
Warning: require(../thlinkphp/public/index.php): failed to open stream: No such file or directory in D:\phpStudy\WWW\orange\index.php on line 3
Fatal error: require(): Failed opening required '../thlinkphp/public/index.php' (include_path='.;C:\php\pear') in D:\phpStudy\WWW\orange\index.php on line 3 展开
展开全部
require('../thlinkphp/public/index.php');错了吧,你要加载的是thinkphp源码包 不是加载index.php
参考下面的写吧:
header('content-type:text/html;charset=utf-8');
//根目录
define('__ROOT__', '/office');
//开启报错信息
define("APP_DEBUG",true);
//定义项目名称
define('APP_NAME', 'office');
//定义项目路径
define('APP_PATH', 'application/default/');
//加载框架入文件
require 'library/ThinkPHP/ThinkPHP.php';
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询