[PHP] - Laravel 5 的 Hello Wold
吐槽一段
整了半天,Laravel下载麻烦得可以去死。先要安装composer,而composer又被共墙了,之后又要安装git,安装完git还要注册git,等等。。。。
最终放弃这种玩法,太恶心了。我操。
最后在这里,找到这个:
Laravel 5的整个框架源码下载:
https://github.com/overtrue/latest-laravel
下载完后,解压laravel-master.tar.gz到php项目的目录。
我这里的是:F:\PhpProject\laravel5
Laravel 5正确运行的步骤:
步骤一
1、打开apache的httpd.conf文件,打开这个Module:
LoadModule rewrite_module modules/mod_rewrite.so
这是URL重写模块
2、把Directory的AllowOverride设置为All
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow From All
</Directory>
步骤二
打开apache的虚拟主机配置文件:httpd-vhosts.conf
在conf\extra目录下
1、同样,把Directory里的AllowOverride设置为All
<Directory />
# 列出目录资源
Options Indexes FollowSymLinks
# 禁止列出目录资源
#Options FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
2、把DocumentRoot指向Laravel的public目录,如:
DocumentRoot "F:/PhpProject/laravel5/public"
因为Laravel最终是只公开public目录
步骤三
启动apache,地址栏输入:http://localhost 将看到如下画面:

妈B,千呼万唤屎出来。。。。。。
Hello World
打开文件:app\Http\routes.php
加入代码:
Route::get('/hi', function()
{
return 'Hello World';
});
地址栏输入:http://localhost/hi
出现:

整了半天,终于整出个Hello Wold,JB都折了。
参考文章:
学习laravel之路由问题 404
http://www.cnblogs.com/perseverancevictory/p/4264379.html
Laravel视频 Hello World
http://v.youku.com/v_show/id_XNjgwNDg3OTQ4.html?from=s1.8-1-1.2
[PHP] - Laravel 5 的 Hello Wold的更多相关文章
- TODO:Laravel增加验证码
TODO:Laravel增加验证码1. 先聊聊验证码是什么,有什么作用?验证码(CAPTCHA)是"Completely Automated Public Turing test to te ...
- TODO:Laravel 内置简单登录
TODO:Laravel 内置简单登录 1. 激活Laravel的Auth系统Laravel 利用 PHP 的新特性 trait 内置了非常完善好用的简单用户登录注册功能,适合一些不需要复杂用户权限管 ...
- TODO:Laravel 使用blade标签布局页面
TODO:Laravel 使用blade标签布局页面 本文主要介绍Laravel的标签使用,统一布局页面.主要用到到标签有@yield,@ stack,@extends,@section,@stop, ...
- TODO:搭建Laravel VueJS SemanticUI
TODO:搭建Laravel VueJS SemanticUI Laravel是一套简洁.优雅的PHP开发框架(PHP Web Framework).可以让你从面条一样杂乱的代码中解脱出来:它可以帮你 ...
- Bringing Whoops Back to Laravel 5
You might be missing the "prettier" Whoops error handler from Laravel 4. If so, here's how ...
- 在 Laravel 中使用图片处理库 Integration/Image
系统需求 PHP >= 5.3 Fileinfo Extension GD Library (>=2.0) … or … Imagick PHP extension (>=6.5.7 ...
- Laravel Composer and ServiceProvider
Composer and: 创建自定义类库时,按命名空间把文件夹结构组织好 composer.json>autoload>classmap>psr-4 composer dump-a ...
- Laravel 5.x 请求的生命周期(附源码)
Laravel最早接触是刚开始实习的时候,那时通过网上的学习资料很快便上手,开发模块接口.后来没有什么深入和总结,但是当我刚开始学Laravel的时候,我对Laravel最大的认识就是,框架除了路由. ...
- Laravel 5.3 登录注册底层实现详解
每个控制器都使用 trait 来引入它们需要的方法 */ 用于处理用户登录认证 用于处理新用户注册 包含重置密码逻辑 用于处理重置密码邮件链接 认证需要的视图 包含了应用的基础布局文件 ...
随机推荐
- LeetCode 20 -- Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the inpu ...
- Java—从文件中读取数据
1.FileInputStream() // 构建字节输入流对象,参数为文件名 FileInputStream fin = new FileInputStream("message" ...
- ubuntu下avd创建和文件传输
进入安卓官网下载安卓sdk并解压到指定路径 在命令行模式下进入安卓文件的toos文件夹下 android avd #在弹出的对话框中新建虚拟机 adb install ~/targetPath/hel ...
- C#双链表
单链表允许从一个结点直接访问它的后继结点,所以, 找直接后继结点的时间复杂度是 O(1).但是,要找某个结点的直接前驱结点,只能从表的头引用开始遍历各结点.如果某个结点的 Next 等于该结点,那么, ...
- 【LeetCode】Roman to Integer & Integer to Roman
Roman to Integer Given a roman numeral, convert it to an integer. Input is guaranteed to be within t ...
- CodeForces比赛总结表
Codeforces A B C D ...
- bs4 python解析html
使用文档:https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/ python的编码问题比较恶心. decode解码encode编码 在文件 ...
- 命令行模式 svn版本管理
linux 下svn 在命令行模式下的操作安装完svn服务并配置了环境变量之后,要创建一个存放工厂(项目)的仓库repositories用于版本控制(比如我的repositories的路径为 path ...
- tinyhttpd源码分析
我们经常使用网页,作为开发人员我们也部署过httpd服务器,比如开源的apache,也开发过httpd后台服务,比如fastcgi程序,不过对于httpd服务器内部的运行机制,却不是非常了解,前几天看 ...
- PAT (Advanced Level) Practise:1002. A+B for Polynomials
[题目链接] This time, you are supposed to find A+B where A and B are two polynomials. Input Each input f ...