|
.htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:REDIRECT_APP_PATH} !^$
RewriteRule ^(.*)$ - [E=APP_PATH:%{ENV:REDIRECT_APP_PATH}]
RewriteCond %{ENV:APP_PATH} ^$
RewriteRule ^(.*)$ - [E=APP_PATH:/$1]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
-------
App.php
public $indexPage = '';
------
Routes.php
$routes->get('/', 'Home::index');
$routes->get('xx', 'Home::xx');
-----
Home.php
public function index()
{
return view('welcome_message');
}
public function xx()
{
echo "xx";
}
----
但为什么
http://127.0.0.1:2405/ 可以正常浏览,而
http://127.0.0.1:2405/xx 却显示 No input file specified.
Routes.php改成
$routes->add('xx', 'Home\xx');
也一样出同样的错误。
|
|