The first time I read the code written on the Internet: & lt ;? Phpdefine (& amp; #39; THINK_PATH & amp; #39;, & amp; #39; ThinkPHP & amp; #39;); define (& amp; #39; app_NAME & amp; #39;, & amp; #39; 43 & amp; #39;); define (& amp; #39 ;...
The first time I read the code written on the Internet:
-
- Define ('think _ path', 'thinkphp ');
- Define ('app _ name', '43 ');
- Define ('app _ path ','.');
- Require (THINK_PATH. '/ThinkPHP. php ');
- $ App = new App ();
- $ App-> run (); (this line can be avoided or the result will appear twice)
- ?>
Report error:
Warning: require (.. /ThinkPHPCommon/runtime. php) [function. require]: failed to open stream: No such file or directory in D: \ web \ htdocs \ 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. php on line 36
View the information:
Are you using ThinkPHP 3?
Definition of the constant THINK_PATH:
ThinkPHP 2.x
Define ('think _ path', '../thinkphp ');
ThinkPHP 3.x
Define ('think _ path', '../ThinkPHP /');
Of course, you can not define ThinkPHP. ThinkPHP is really strange. we don't declare such a major change. Aren't we going to let people use it?
Later, I still couldn't do it. it seems that I only knew define ('think _ path', 'thinkphp'); I wrote less/define ('think _ path', 'thinkphp /'); that's right.