This problem occurs when I access the PHP project written in SpeedPHP. I checked the problem when I was trying to answer Baidu's question, which seems to be: include_path = '.; c: \ php \ pear 'and I will follow the tutorial to put php. ini .; deleted or not.
I also asked a lot of questions about path in my predecessors ~ But I have adjusted my path.
Can you help me find out what is wrong? I'm in a hurry.
The code for index. php is as follows:
Array ('host' => 'localhost', 'login' => 'root', 'password' => '', 'database' => 'test ',), 'View' => array ('enabled' => TRUE, // enable Smarty 'config' => array ('Template _ dir' => APP_PATH. '/tpl', // The directory in which the template is stored 'compile _ dir' => APP_PATH. '/tmp', // The compiled temporary directory 'cache _ dir' => APP_PATH. '/tmp', // cache temporary directory 'left _ delimiter '=>' <{', // smarty left qualifier 'right _ delimiter' => '}> ', // smarty right qualifier),),); require (SP_PATH. "/SpeedPHP. php "); spRun (); // New features of SpeedPHP 3
The main. php code is as follows:
Results = $ guestbook-> findAll (); // you can use $ this-> results to send the value of $ guestbook-> findAll () to the template, $ results can be used in the template. $ This-> display ("white/index.html"); // display template. the template used here is the root directory/tpl/green/index.html .} Function write () {// Here is the message $ guestbook = spClass ("guestbook "); $ newrow = array (// The value 'name' => $ this-> spArgs ('name') of the new record '), 'title' => $ this-> spArgs ('title '), // Obtain the form submission title 'Contents' from spArgs =>$ this-> spArgs ('contents'),); $ guestbook-> create ($ newrow ); echo "message success, return" ;}}?>
I am very grateful to you ~
Reply to discussion (solution)
Your project is under e:/wamp/www/questbook
So where is speedphp?
Generally, multi-project applications are
Www-the root of the website
Speedphp-SpeedPHP system file directory
Questbook
One directory for each project
Is that true for you?
If yes, define ("SP_PATH", dirname (_ FILE _). "/SpeedPHP ");
Define ("SP_PATH", dirname (_ FILE _). "/SpeedPHP ");
Your project is under e:/wamp/www/questbook
So where is speedphp?
Generally, multi-project applications are
Www-the root of the website
Speedphp-SpeedPHP system file directory
Questbook
One directory for each project
Is that true for you?
If yes, define ("SP_PATH", dirname (_ FILE _). "/SpeedPHP ");
Define ("SP_PATH", dirname (_ FILE _). "/SpeedPHP ");
Thank you very much ~ Problem solved ~ Another problem is that I forgot to put Speedphp under my project ~ Hey hey ~ Sloppy ~ You have all the points.