thinkphp creating a sub-app, thinkphp creating an app _php tutorial

Source: Internet
Author: User
Tags php define

thinkphp Create a sub-app, thinkphp create an app


1 root directory Build file name a

Set up index.php under 2 a

Define (' App_name ', ' a ');
Define (' App_path ', './a ');
Define (' Runtime_path ', './temp/');
Require '. /thinkphp/thinkphp.php ';

3 in Browser input


thinkphp How do I create a table project that requires a program to create a nonexistent table at run time, and how does thinkphp implement it?

You should be the data table, this needs to be created in the database, you open phpmyadmin new database and create a table.

thinkphp How to create a class that can only be used by other classes to invoke this class, and not externally to access it?

The outside can not access the Thinkphp class, you should say is the function bar.
If you are only accessing your class, use the private statement
If you also allow inherited access, declare it with protected
In addition, thinkphp does not allow external calls to the "_" underscore method, even if the method is declared with public.

http://www.bkjia.com/PHPjc/834018.html www.bkjia.com true http://www.bkjia.com/PHPjc/834018.html techarticle thinkphp Create a sub-app, thinkphp create an app 1 root directory establish the filename a 2 a under establish index.php define (' app_name ', ' a '); define (' App_path ', './a '); Define ( ' Runtime_path ', './t ...

  • Related Article

    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.