使用命令new來創(chuàng)建Symfony項目"symfony.framework"
php symfony new symfony.framework
一般會有這個錯誤:
[GuzzleHttp\Exception\RequestException]
cURL error 60: SSL certificate problem: unable to get local issuer certificate
[GuzzleHttp\Ring\Exception\RingException]
cURL error 60: SSL certificate problem: unable to get local issuer certificate
解決方案:
1.下載 cacert.pem
https://curl.haxx.se/ca/cacert.pem
2.在php.ini里面加上這個:
curl.cainfo = "[pathtothisfile]\cacert.pem"
如:
curl.cainfo = "D:\phpStudy\php55n\cacert.pem"
3.重新使用命令new來創(chuàng)建Symfony項目
php symfony new symfony.framework
此時創(chuàng)建成功!
測試:
$ php bin/console server:run
[OK] Server listening on http://127.0.0.1:8000
// Quit the server with CONTROL-C.