I installed ThinkPHP and SAE engines on Sina's SAE. I directly installed the source code package and started Memcache and MySql services to run successfully. ThinkPHP
You have downloaded the wampserver and will try to run ThinkPHP locally later.
In the app/lib/Action/folder, you can define a controller class for each module. a module can contain multiple operation methods. when there is a request, the module and operation of the current request are parsed from the URL parameter. For example, the default controller class IndexAciton. class. php is defined as follows:
<? Phpclass IndexAction extends Action {ptotect function _ initialize () {header ("Content-Type: text/html; charset = utf-8");} public function index () {$ this-> display ();} public function imit () {echo "Sae service simulator function test (the following services can also be run locally ):";}}
Access http: // localhost/. The system accesses the default operation (Index) of the default module ). If you input http: // localhost/Index/imit, the system will access the default module (Index) operation method (imit ). This URL mode is the PATHINFO mode, which is the default format of ThinkPHP. you can also set other formats in ThinkPHP/Conf/convention. php, such as normal mode, REWRITE mode, and compatibility mode.
It's just a note. Why can't I set it to only visible by myself? I am so embarrassed to show it to others.
The REWRITE mode of a URL request is supported by adding REWRITE rules based on the PATHINFO mode. for Apache, The. htaccess file is added at the same level of the entry file. the content is:
RewriteEngine onRewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
This is not the case. you also need to enable the rewrite function of Apache. Find LoadModule rewrite_module modules/mod_rewrite.so in the httpd. conf configuration file and remove the previous #. change AllowOverride None to AllowOverride All. This is valid.