This problem occurs when I access a PHP project using SpeedPHP.

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.