#1 tanidea
有两个入口文件,index.php 和 admin.php
index.php代码
define('APP_DIR', realpath('./'));
require(APP_DIR.'/protected/lib/speed.php');
file_put_contents('file',var_export(get_included_files(),true));
运行 admin.php的同时,index.php也运行了,file文件被写入了
array (这可不是想要的。
0 => 'D:\\WAMP\\www\\speed\\index.php',
1 => 'D:\\WAMP\\www\\speed\\protected\\lib\\speed.php',
2 => 'D:\\WAMP\\www\\speed\\protected\\config.php',
3 => 'D:\\WAMP\\www\\speed\\protected\\controller\\MainController.php',
4 => 'D:\\WAMP\\www\\speed\\protected\\controller\\BaseController.php',
5 => 'D:\\WAMP\\www\\speed\\protected\\include\\functions.php',
6 => 'D:\\WAMP\\www\\speed\\protected\\tmp\\60155440c01a7c960d42ccd04744cfd5.1466823477.layout.html.php',
7 => 'D:\\WAMP\\www\\speed\\protected\\tmp\\cd30298c7f199ab9b41324e3c1d6341c.1467940570.main_index.html.php',
)
统一入口可以,但一定要唯一入口吗?admin.php, member.php, download.php这样的呢?
想要添加多入口,如 admin.php (admin.php可以随便修改,让别人找不到后台登录网址)
不知道要怎么修改.htaccess 文件
是修改.htaccess文件好,还是修改config.php的rewrite数组好?jake
2016-07-11 09:49:22