douwu5428 2017-07-05 06:34
浏览 138
已采纳

无法打开流:Laravel 5.4中的权限被拒绝甚至Al文件权限也被授予使用Laravel 5.4中的存储功能的路径

I am trying to upload a file into C:\Users\sandeep\maxo\storage\app\public folder in laravel 5.4. I am using the below code

    <!DOCTYPE html>
    <html>
        <head>
            <title></title>
        </head>
        <body>
            <form  action="{{ URL::to('importExcelFile') }}" class="form-horizontal" method="post" enctype="multipart/form-data">
                <input type="file" name="import_file" />
                {{ csrf_field() }}
                <br/>
                <button >Import CSV or Excel File</button>
            </form>
        </body>
    </html>

$path = $request->file('import_file')->store('public');

is the laravel code.

But I am getting an error like this

fopen(C:\Users\sandeep\maxo\storage\app\public/K4oIHMXveyx2VChmAXAcNkTmoIXKACvqoIbbHCeB.): failed to open stream: Permission denied

This is the picture of my error Click here

But When i Upload the image its working fine

</div>
  • 写回答

2条回答 默认 最新

  • donglou1866 2017-07-05 09:58
    关注

    Try on terminal sudo chmod -R 777 public it will change the directory permission

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制