使用 Lavarel 开发完全可以抛开wamp,phpstudy等一键环境.因为lavarel 内置的artisan 整合了php5.4 内置的webserver ,甚至可以使用artisan 命令指定主机地址和端口号.
php artisan serve --host=127.0.0.1
## 有多个网卡的时候,这是不错的选择
php artisan serve --port=12000
## 任意指定端口号
虽然不如nginx 和apache配置强大,但是本地测试足够了. 下图证明OK.
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfAAAAB7CAIAAAAEzkUeAAARx0lEQVR4nO2dP2jcyB7H1alQYVxstRyLMSGFMSniwjikyBZpAksCB8ZgV8bBV7jwNg9c2LwihRo3zwtpzvvAxeHYhcFOipCFHIEN3DsvGAf2CDnMnl0YF6pUqNMr1n80P2nXM9JodzT6fsoQa0cjzWdGv5n5jeEDAADQAmPYBQAAACAHCB0AADQBQgcAAE2A0AEAQBMgdAAA0AQIHQAANAFCBwAATYDQAQBAEyB0AADQBAgdAAA0AUIHAABNgNABAEATIHQAANAECB0APflmPzLueGR/G3aBQPpA6ADoCYSeQyB0APQEQs8hEDoAegKh5xClhH6wYARZOBh2gQDILsoL3dmpGGmRV3lA6ADoifJCZwsIocsAQgdATyD0HAKhA6Anygv9/aIJoUsGQgdAT5QXOtPe0dqlAKEDoCeqC93bn0Vrlw2EDoCeqC50pnyjK41hl0cLIHQA9CRTQleveNkEQgdAT1QX+te1n1QuXjaB0AHQE9WFzjT32X1v2OXRAggdAD3JlNDR2OUAoQOgJ4oL/a/NKTR26UDoAOiJ4kLHnGgaQOgA6IniQj95M6Fw6bIKhA6AnigudKa1P3v7z7DLowcQOgB6kiWho61LAkIHQE/UFvo/b5+hrcsHQgdAT9QWOlO6n9a+Drs8mgChA6AnGRK6aoXLLhA6AHqittCZZOiqFS67QOjx8ZyLdvOotr40V54olYojwWz9VqFUmijPrdr1RuvKHVoBfzS31+fKE8HCWYVSabqyar9rniUtl3vVaTXq9upSZbpUKhWswP2bI8VSabqytF47av5w8r6r23N+3L0oTD0ZVqGUVkWpLXTMiaYChC6K5/x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cxF4Dz3notNuHtXW58pj9F0LDxsyIPSoqaYu1lj5tV1vtDqd4CnZ7lWn02rU7dVK2EbhkHKqQo/eviV9OjQC7/vObGjUePPaPCi/tutHzTZbb55z0em0m0d1e7UyXYjQlGF0e9IYrlJe6IHaKU5XVu36XqPVYeun+2Z1Wo292vpSnxp6uCLY2+kKhN4HNgIch+hhVSaE7kfHKMUwiy+2IkJV6Qqd5rQ3jAFuGvS+7y9HjR9jYk0uxz6WOztCTwLvd2NOgNDvIbDIQIw+AZqsCN33EwiqX0NLWehhow84SZPb3l2OjJvwY42Vq9t/JBKVikJ3Tnaq4Y/YeJjFp9XYvZ2uQOgceM7pLv9raI2Vq9vNsz7B9iwJ3fd933fPPm1FR3YjMEcez9v9w8ZpC13OWdBJy+Cc9oqH93l5ChPlaq0hRVMqCr2L55w2auu9Iyj3vF8Pyq/td31bWH5RSuiq4161GnV7da48USox76JVKJWmK0vrtSOxGZ6M4Tk/mke19aXKdKlUDIrKHCmWJspzq3a90bpCO2PxnIu716bI+t0qlEqlifLc0qpdP2q281d3nnPRauzV7dWlufJEKVQ/pIr2Gq0LjduXDCB0AADQBAgdAAA0AUIHAABNgNABAEATIHQAANAECB0AADQBQgcAAE2A0AEAQBMgdAAA0AQIHQAANAFCBwAATYDQAQBAEyB0AADQBAgdAAA0AUIHAABNgNABAEATIHQAANAECB0AADQBQgcAAE2A0AEAQBMgdAAA0AQIHQAANAFCBwAATYDQAQBAEyB0AADQBAgdAAA0AUIHAABNgNABAEATIHQAANAECB0AADQBQgcAAE34P2QfDQOJ4QmrAAAAAElFTkSuQmCC" alt="" />
因为php 的webserver 在5.4之后才有,所以版本一定要高于5.4 啦,
访问这个地址下载 对应系统的php版本,nts版,64位的看清楚了,
http://windows.php.net/download/
解压到你指定的位置,修改php.ini-development 为php.ini ,打开加上extension_dir="ext",去掉下面扩展文件前的注释.
去掉 extension=php_mbstring.dll 前面的分号(888 行左右)
去掉 extension=php_openssl.dll 前面的分号(893 行左右)
把当前php目录加入环境变量.
打开cmd
\\laravel-master>php -v
PHP 5.6.16 (cli) (built: Nov 25 2015 18:51:25)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
下载laravel 的一键安装版,想了解清楚点的可以用composer 安装,是目前最潮的安装的方法
http://down.golaravel.com/laravel/laravel-v5.1.11.zip
解压到你的目录,打开命令行切换到laravel 目录.如果你装了Gow ,直接右键该目录
执行php artisan serve
done!!