警告:file_put_contents(symfony):无法打开流:第 1 行命令行代码中的权限被拒绝 [英] Warning: file_put_contents(symfony): failed to open stream: Permission denied in Command line code on line 1
本文介绍了警告:file_put_contents(symfony):无法打开流:第 1 行命令行代码中的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试安装 Symfony 2:
I am trying to install the Symfony 2:
php -r "file_put_contents('symfony', file_get_contents('https://symfony.com/installer'));"
但我收到此错误:
警告:file_put_contents(symfony):无法打开流:权限在第 1 行的命令行代码中被拒绝
Warning: file_put_contents(symfony): failed to open stream: Permission denied in Command line code on line 1
请帮我解决这个问题.谢谢
Please help me in resolving this. Thanks
推荐答案
似乎"您是在 Windows 上安装,但无论您使用的是什么命令都不正确.请参阅此参考:
It 'appears' that you are installing on Windows, but regardless the command you are using is incorrect. See this reference:
https://symfony.com/doc/current/setup.html#creating-symfony-applications
所以如果在 Windows 上尝试:
So if on Windows try:
c:\> php -r "readfile('https://symfony.com/installer');" > symfony
确保您对正在使用的文件夹具有权限.
Make sure you have permissions on the folder you are using.
这篇关于警告:file_put_contents(symfony):无法打开流:第 1 行命令行代码中的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文