我第一次 看网上写的代码

define('THINK_PATH','ThinkPHP');
define('App_NAME','43');
define('App_PATH','.');

require(THINK_PATH.'/ThinkPHP.php');

$App=new App();

$App->run();(这一行 可以不要   要不然结果会出现两次)

?>

报告出错:

Warning: require(../ThinkPHPCommon/runtime.php) [function.require]: failed to open stream: No such file or directory in D:\web\htdocs\ThinkPHP\ThinkPHP.php on line 36

Fatal error: require() [function.require]: Failed opening required '../ThinkPHPCommon/runtime.php' (include_path='.;C:\php5\pear') in D:\web\htdocs\ThinkPHP\ThinkPHP.php on line 36

查资料看到 :

你使用的是 ThinkPHP 3 吧?

关于常量 THINK_PATH 的定义:
ThinkPHP 2.x
define('THINK_PATH', '../ThinkPHP');

ThinkPHP 3.x
define('THINK_PATH', '../ThinkPHP/');

当然你可以不去定义它

ThinkPHP 真的很奇怪,这样重大的改变都不声明一下
难道不打算让人家用它了?

后来还是不行

看来变天才知道

define('THINK_PATH','ThinkPHP');
少写了一个/

define('THINK_PATH','ThinkPHP/');  这样就对了

要细心哈哈

第一次用THINKPHP 报路径错的更多相关文章

  1. 第一次安装tomcat报错,出现failed to install tomcat8 service错误

    第一次安装tomcat报错,出现failed to install tomcat8 service错误(0) 一.一般情况下这种错误都是没有卸载干净造成的,安全卸载Tomcat的方法 (转载); ht ...

  2. 新引入thinkphp报错“应用目录[./Application/]不可写,目录无法自动生成! 请手动生成项目目录~”

    新引入thinkphp报错“应用目录[./Application/]不可写,目录无法自动生成! 请手动生成项目目录~”, 其主要原因是文件夹的权限问题,手动将项目文件夹权限更改为可读可写就OK,具体操 ...

  3. Bootstrap中glyphicons-halflings-regular.woff字体报404错notfound

    今天查看网站的源代码,发现有个glyphicons-halflings-regular.woff文件没有找到,因为我的网站使用了bootstrap的Glyphicons 字体图标,因此需要加载Glyp ...

  4. Please, configure Web Facet first!idea报这错的解决办法!!

    Please, configure Web Facet first!idea报这错的解决办法!! 今天在idea导入用eclipse的项目,然后运行项目的时候报这个错, 看下图 网上找了好多都没解决, ...

  5. ThinkPHP报Class 'Core\Log' not found竟然是由这个原因导致的

    项目在开发阶段运行的好好的(Debug=true),上线后(Debug=false)其中有一个页面报“对不起,您的页面暂进无法找到!”错误.摸不清头脑,看看了这个页面也没有什么两样,可就是提示这句话, ...

  6. (转)Bootstrap中glyphicons-halflings-regular.woff字体报404错notfound

    http://blog.xmaoseo.com/glyphicons-halflings-regular-woff-font-404-notfound/ 今天查看网站的源代码,发现有个glyphico ...

  7. thinkphp配置文件路径

    thinkphp配置文件路径在入口文件index.php中配置. 如果Public目录在应用程序目录同等级位置: 2.如果Public在app内部则: 3.如果使用Public在app外部,但定义为: ...

  8. gitlab 创建SSH Keys 报500错

    gitlab 创建SSH Keys 报500错 看了一下日志 root@322323:/home/git/gitlab/log# cat production.log Errno::ENOMEM (C ...

  9. asp.net MVC webservice 报次错解决方法

    asp.net  MVC  webservice  报次错解决方法: 解决方法: 在 RouteConfig.cs public static void RegisterRoutes(RouteCol ...

随机推荐

  1. SEO搜索引擎优化基础

    要如何提高自己网站的知名度,那必须了解一些SEO知识. 1.什么是搜索引擎 所谓的搜索引擎(Search  Engines)是一些能够主动搜索信息(搜索网页上的单词和简短的特定的内容描述)并将其自动索 ...

  2. python 浮点数问题

    为什么 输入:0.2 + 0.1 得到的是:0.30000000000000004???? 0.1 * 3 = 0.30000000000000004????

  3. LeetCode with Python -> Linked List

    21. Merge Two Sorted Lists Merge two sorted linked lists and return it as a new list. The new list s ...

  4. jquery怎样获取html页面中的data-xxx

    $(this).attr("data-id") // will return the string "123"or .data() (if you use ne ...

  5. 第六篇:python基础_6 内置函数与常用模块(一)

    本篇内容 内置函数 匿名函数 re模块 time模块 random模块 os模块 sys模块 json与pickle模块 shelve模块 一. 内置函数 1.定义 内置函数又被称为工厂函数. 2.常 ...

  6. 【bzoj4555】[Tjoi2016&Heoi2016]求和 NTT

    题目描述 在2016年,佳媛姐姐刚刚学习了第二类斯特林数,非常开心. 现在他想计算这样一个函数的值: S(i, j)表示第二类斯特林数,递推公式为: S(i, j) = j ∗ S(i − 1, j) ...

  7. Gym 100971C 水&愚&三角形

    Description standard input/output Announcement   Statements There is a set of n segments with the le ...

  8. id_rsa id_rsa.pub

    id_rsa  私钥 id_rsa.pub  公钥 https://blog.csdn.net/qq_36663951/article/details/78749217 https://blog.cs ...

  9. ext2 与 ext3

    http://linux.vbird.org/linux_basic/1010appendix_B.php https://baike.baidu.com/item/Ext2/822106?fr=al ...

  10. inux监控平台搭建-监控项

    linux监控平台搭建-监控项 本人运维某生态互联网监控平台服务.过程中遇见了很多问题.目前互联网有很多的开源监控工具:nagios.zabbix.falcon.cacti...各有优点.这里不讲解监 ...