thinkphp creates sub-applications, thinkphp creates applications_PHP tutorial

WBOY
Release: 2016-07-13 10:23:50
Original
1044 people have browsed it

thinkphp creates a sub-application, thinkphp creates an application

1 Create root directory file name a

Create index.php under 2 a

define('APP_NAME', 'a');
define('APP_PATH', './a');
define('RUNTIME_PATH', './Temp/');
require '../ThinkPHP/ThinkPHP.php';

3 Enter

in the browser

How to create a table project in thinkphp requires the program to create a non-existent table at runtime. How can thinkPHP implement this?

You should be talking about a data table. This needs to be created in the database. You open phpMyAdmin to create a new database and then create the table.

How to create a class in thinkphp that can only be called by other classes but not accessible from outside?

Thinkphp classes cannot be accessed from the outside. You should be talking about functions.
If it is only accessed by the own class, use the private statement
If inherited access is also allowed, use the protected statement
In addition, thinkphp does not allow external calls to methods starting with an underscore "_", even if this method is declared public.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/834018.htmlTechArticlethinkphp creates a sub-application, thinkphp creates an application 1. Create the file name a in the root directory 2. Create index.php define( 'APP_NAME', 'a'); define('APP_PATH', './a'); define('RUNTIME_PATH', './T...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template