简体   繁体   中英

Failed to open dir on server

In localhost I can delete, copy my folder and files just fine. However, after I host my web app, those functions don't work on the server.

Here is the error that I got:

Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator ::__construct(/home/solution/public_html/portalprojectcdr/backend/web/The Library/ISU/New directory) : failed to open dir: No such file or directory' in /home/solution/public_html/portal/backend/views/site /submit_upload_to_server.php:73

As there seems to be a new directory involved in your error, i suppose you should check permission and owners for your files.

Please mass downvote if this advice in unsecure, but i use it on production : Define the user www-data as owner of the file and folder that must be writable. If you are not on production, you can try a naughty chmod 777 where needed, to see if your problem is really permission related.

Don't forget to put permission back to normal after your test.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM