Default Template substitution rules:
. /public : usually / project directory /tpl/default/public/
__public__ : It will be replaced with the public directory of the current site usually /public/
__tmpl__ usually / project directory /tpl/default/
__root__
__app__ url address
__url__ url address (without domain name)
__action__ : Will replace the current operation of the url address
__self__ : will replace the current page URL
You can also customize the substitution rule by configuring the value of Tmpl_parse_string in the project configuration file, such as:
Tmpl_parse_string + = Array (
' __public__ ' = ' /common ' , // Change the default__public__substitution Rules
< Span lang= "en-us" xml:lang= "en-us" > ' __upload__ ' =>&NBSP; < Span style= "Color:rgb (221,0,0);" > '/public/uploads/' // add new upload path substitution rules
)
EXAMPLE:
file path: aoli/home/tpl/default/user/index.html
<p>__root__ represents the URL of the current website </p>
<p>_ _URL__ represents the URL address of the current module/index.php/user</p>
<p>.. /public represents/aoli/tpl/default/public</p>
<p>__public__ represents the project public file directory/public</p>
<p>__tmpl__ represents the template directory for the current project/aoli/tpl/default/</p>
<p>__app__ Represents the entry file address of the current project/index.php</p>
<p>__action__ represents the current action address/index.php/user/index</p>
<p>__self__ represents the current URL address/index.php/user/</p>
<p>__upload__</p
<form action= "__url__/add" method= "post";
<input type= " Text "name=" username "/>
<input type=" Submit "value=" register "/>
< /form>
File path: aoli/home/lib/action/useraction.class.php
<?php
class Useraction extends Action {
function index () {
$this- >display ();
}
function Add () {
dump ($_post);
}
}
?
Access path: Http://aoli.com/index.php/User/index input content, click the Register button to jump to Http://aoli.com/index.php/User/add and execute the Add method under the User module, Outputs the submitted content.