PHP头条
热点:

ThinkPHP在SAE下关于url重写的有关问题


ThinkPHP在SAE下关于url重写的问题
thinkphp。
根目录下有config.yaml(因为SAE不支持.htaccess)
内容为:

name: thinktest
version: 1
handle:
  - rewrite: if(!is_dir() && !is_file() && path~"^(.*)$") goto "/index.php/$1"
  - rewrite: if(path~"^/test\.html$") goto "/test.php"

关键看第二个重写。
在根目录下有test.html和test.php
访问test.html的时候可以访问到test.php

问题是
有入口文件index.php
Action里有文件IndexAction.class.php
其中index操作代码如下:

  echo "

相关文章

PHP之友评论

今天推荐