Wampserver has been downloaded and there is time to try running thinkphp locally.
The controller class can be defined for each module under the App/lib/action/folder, a module can contain multiple action methods, and when requested, the current requested module and operation are parsed from the URL parameter. For example, the default controller class defined IndexAciton.class.php:
<?php
class Indexaction extends action{
ptotect function _initialize () {
header ("content-type:text/ Html;charset=utf-8 ");
}
Public Function Index () {
$this->display ();
}
The Public Function Imit () {
echo "
Access to http://localhost/, the default action (index) is accessed by the system. Relative input http://localhost/Index/imit, the system accesses the default module (Index) Action method (Imit). This URL pattern is pathinfo mode, the default format for thinkphp, and other formats can be set in thinkphp/conf/convention.php, such as normal mode, rewrite mode, and compatibility mode.
Just notes, why can not be set to only themselves visible, I write a mess are embarrassed to show people ah.
The rewrite pattern for URL requests is the support for adding rewrite rules based on the pathinfo pattern, which, in the case of Apache, is added at the same level as the entry file. htaccess file, which reads:
<ifmodule mod_rewrite.c>
rewriteengine on
rewritecond%{request_filename}!-d
Rewritecond%{ Request_filename}!-f
rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
</IfModule>
Only this is not possible, but also need to turn on the Apache rewrite function. In the httpd.conf configuration file, find the LoadModule rewrite_module modules/mod_rewrite.so remove the front #, find allowoverride None to allowoverride all. So it works.