ThinkPhp creates a new web Project

Source: Internet
Author: User
Step 1: create indexes in the same file under the newly created directory and the ThinkPhP directory. php and admin. php. step 2: In index. write the following code in php: & lt ;? Php...

Step 1:Create index. php and admin. php.

Step 2:Write the following code in index. php:

  1. // If you place index. php outside the project directory, add the following three lines
  2. // Define ('app _ name', 'vvdai ');
  3. // Define ('app _ path', 'vvdai /');
  4. // Require 'vvdai/ThinkPHP. php ';
  5.  
  6. Define ('app _ debug', true); // enable debugging mode
  7. Define ('app _ name', 'home ');
  8. Define ('app _ path', './Home /');
  9. Require 'thinkphp/ThinkPHP. php ';
  10. ?>

Write in admin. php:

  1. // If you place index. php outside the project directory, add the following three lines
  2. // Define ('app _ name', 'vvdai ');
  3. // Define ('app _ path', 'vvdai /');
  4. // Require 'vvdai/ThinkPHP. php ';
  5. Define ('app _ debug', true); // enable debugging mode
  6. Define ('app _ name', Admin );
  7. Define ('app _ path', './Admin /');
  8. Require 'thinkphp/ThinkPHP. php ';
  9. ?>

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.