Heim > Artikel > Backend-Entwicklung > thinkphp笔记,thinkphp_PHP教程
'URL_PATHINFO_DEPR'=>'-', //修改URL的分隔符
'TMPL_L_DELIM'=>' 'TMPL_R_DELIM'=>'}>', //修改右定界符 http://localhost/test/index.php/Index-add-name-wuhao-age-23 http://localhost/test/index.php/Index/index你好!{$myname}
D:\wamp\www\test\App\Tpl\Index 需要在方法中通过new Model(表名)的形式操作数据库 $m=new Model('User'); $arr=$m->select(); 'DB_TYPE'=>'mysql', //设置数据库类型用法 | 含义 | 例子 |
---|---|---|
$Think.server | 获取$_SERVER | {$Think.server.php_self} |
$Think.get | 获取$_GET | {$Think.get.id} |
$Think.post | 获取$_POST | {$Think.post.name} |
$Think.request | 获取$_REQUEST | {$Think.request.user_id} |
$Think.cookie | 获取$_COOKIE | {$Think.cookie.username} |
$Think.session | 获取$_SESSION | {$Think.session.user_id} |
$Think.config | 获取系统配置参数 | {$Think.config.app_status} |
$Think.lang | 获取系统语言变量 | {$Think.lang.user_type} |
$Think.const | 获取系统常量 | {$Think.const.app_name}或{$Think.APP_NAME} |
$Think.env | 获取环境变量 | {$Think.env.HOSTNAME} |
$Think.version | 获取框架版本号 | {$Think.version} |
$Think.now | 获取当前时间 | {$Think.now} |
$Think.template | 获取当前模板 | {$Think.template} |
$Think.ldelim | 获取模板左界定符 | {$Think.ldelim} |
$Think.rdelim | 获取模板右界定符 | {$Think.rdelim} |
{$j} | abc |
这里是渲染页面!!!
{__CONTENT__}