Home  >  Article  >  Backend Development  >  laravel5 安装

laravel5 安装

WBOY
WBOYOriginal
2016-06-06 20:37:23937browse

laravel new app 建了一个工程
然后在 app/http/route.php下了一句

<code>    Route::any('demo', function () {
        return "demo";
    });
</code>

然后只有 '/'的地址才有效,其余都是
laravel5 安装

'public/demo'就是出来这个图的效果,但是'public'好使

回复内容:

laravel new app 建了一个工程
然后在 app/http/route.php下了一句

<code>    Route::any('demo', function () {
        return "demo";
    });
</code>

然后只有 '/'的地址才有效,其余都是
laravel5 安装

'public/demo'就是出来这个图的效果,但是'public'好使

可参考:Laravel 5 系列入门教程(一)【最适合中国人的 Laravel 教程】

两步操作

  1. 上面的教程中,有一句话: “然后将网站根目录配置为 learnlaravel5/public”,请先这样配置以去除 URL 中的 public。

  2. 你的本地站点伪静态配置是失败的,配置好伪静态就可以了。目前你可以尝试访问 public/index.php/demo ,应该能出来你想要的结果。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn