How do I configure PHP to have permission to create directories and make files?

前端 未结 3 340
你的背包
你的背包 2021-01-14 21:10

I have a PHP script that receives uploads and it works fine in mamp, creating directories and receiving files as necessary, but when I move it to the server it errors out sa

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-14 21:42

    The script must be able to write to the parent directory in order to create sub directories, so chmod 777 the parent directory, for instance httpdocs/uploads/ or wherever you are storing these files.

提交回复
热议问题