1. Load thinkphp.php
Requrie ('./thinkphp/thinkphp.php ');
2. Load the core file./thinkphp/lib/core
3. Load the project's file analysis URL to invoke the associated controller
M Module Controller
A Action Method action= page
Muke.com/index.php?m=index&a=index
Custom configuration Files
Add define (' App_debug ', true) to the boot entry;
You can add any configuration file, such as user.php, under the Conf directory.
<?php
Return Array (
' Username ' = ' username2 ',
);
?>
Add the extension profile entry in the config.php file when you are finished adding:
' Load_ext_config ' = ' user ',
The custom profile is loaded every time and should not be recommended.
Url_model
Add Configuration in config.php
' Url_model ' =>3,
1. Default mode pathinfo Mode 1 http://muke.com/index.php/Index/user/id/1.html
0 Common mode Most traditional normal mode http://muke.com/index.php?m=Index&a=user&id=1
2 rewrite mode http://muke.com/Index/user/id/1.html
3 Compatibility Mode http://muke.com/index.php?s=/Index/user/id/1.html
echo C (' Url_model '); Get Url_model Configuration
echo U (' Index/user ', array (' ID ' =>1), ' HTML ', FALSE, ' muke.com ');
About Url_model mode is 2 when overriding the pattern, hiding out how index.php is implemented:
1. Modify httpd.conf find rewrite.so to remove the # number in front of the line and restart the service after saving
2. Add the file named. htaccess to the location of the project root directory and the index.php directory, and the content is added as follows:
<ifmodule mod_rewrite.c>
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
</Ifmodule>
Ok.url_model 2 mode can be accessed, and address rewriting succeeds.
thinkphp Loading and Url_model