Thinkphp Learning (2)---an example of a simple start

Source: Internet
Author: User

Folder directory is the core directory thinkphp, the entry file is the index.php,thinkphp inside the file meaning of the next step, the next is to start a program, you can now modify the entry file, in general, will put their own files in a folder, I am now set up my own folder, a front-end home folder, a background folder admin, how to create a structure with the thinkphp function of the folder? Open index.php, add the following code,

<?php//1, determine the application name home define (' app_name ', ' Admin ');   2, determine the application path, is the Program Entry folder define (' App_path ', './admin/');   3. Turn on Debug mode define (' App_debug ', true); 4. Introduction of core document require './thinkphp/thinkphp.php ';? >

Then enter the LOCALHOST:80/project folder in the browser address bar/Access a index.php, this will automatically generate a folder, the directory there (Tomorrow, ha), where the Lib folder is the Action folder is put controller, TPL is the template, If I enter the localhost/folder name/template file name/method name, this process is the default is to find the project in the index.php, and then locate the entry folder, then go to the specified template name of the action, and then find the action in the method.

This article is from "Martin's Technical Blog" blog, please be sure to keep this source

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: 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.