我在本地主机安装laravel +作曲,然后我试着用这段代码块运行基本routes.php文件:PHP Laravel框架路由错误
Route::get('/x', function()
{
return 'Hello World';
});
,然后我尝试用这种http://localhost/laravel/app/x
运行它和http://localhost/laravel/x
,我想趁自己这个错误类型:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.4 (Unix) PHP/5.5.3 OpenSSL/1.0.1e mod_perl/2.0.8-dev Perl/v5.16.3
我怎样才能解决这个问题?
在路由中删除/之前的x。重新配置您的虚拟主机设置,将您的公共文件夹指向根目录,这样您就不必执行您对网址的操作。如果仍然有问题,请联系我gtalk sarmenhb(at)gmail(dot)com –