使用lavarel框架进行开发时的环境搭建
1.php安装之后要修改php.ini中以下几个地方:
(1)extension_dir = "./"
; On windows:
extension_dir = "./ext"
(2)
(3)
(4)与数据库相关的前面的分号也要去掉:
extension=php_openssl.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
(5)下载证书并将其地址写入php.ini相应的地方:
openssl.cafile=C:\devEnv\php\verify\cacert.pem
2.安装composer
(1)安装完composer后,修改composer的源:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
(2)在项目目录下(含有composer.json文件的目录下)执行composer install.
3.将项目导入phpstorm
(1)在project tool 窗口选择根节点、然后右键->Composer | Init composer,选择composer.phar的路径。
(2)若没有.env文件,则在控制台执行copy .env.example .env。
(3)执行php artisan key:generate得到如下结果:
将【】中的key复制到.env中的APP_KEY=
(4)在控制台进入项目的public目录下执行php -S 0.0.0.0:9000(自定义端口号)
(5)在浏览器中输入127.0.0.1:9000即可看到相关页面。
参考资料:
http://www.cnblogs.com/warnier-zhang/p/5720192.html
http://www.devside.net/wamp-server/laravel-no-supported-encrypter-found-the-cipher-or-key-length-are-invalid
相关推荐
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
Noneyes 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23