The first time I used THINKPHP to report a path error, I copied it online: generate an index. php, as shown below: & lt ;? Php defines the ThinkPHP framework path define (THINK_PATH ,.. thinkPHP); define the project name and path define (APP_NAME, myphp); define (APP_PATH ,.); the first time the framework entry file re was loaded, THINKPHP reported a path error.
An example of online copy: generate an index. php, as shown below:
// Define the ThinkPHP framework path
Define ('think _ path', '../thinkphp ');
// Define the project name and path
Define ('app _ name', 'myphp ');
Define ('app _ path ','.');
// Load the framework entry file
Require (THINK_PATH. "/ThinkPHP. php ");
// Instantiate a website application instance
App: run ();
?>
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
The directory structure is as follows:
Myphp/index. php
Thinkphp/
Let's see what the problem is.
------ Solution --------------------
To read this reply, log on to or register CSDN!