John Davidson

php - failed to open dir: No such file or directory when hosting

0 comments
Message:


In localhost I can add,edit, copy my folder and files ,but after I post in hosting web , those functions don't work on the server.



Warning: opendir(../../data/chapters/PLH8G-BmfHh-ccc0h-Vp7wh): failed to open dir: No such file or directory in /home/vol17_2/ezyro.com/ezyro_32005085/htdocs/render/public/chapter.req.php on line 35


Warning: readdir() expects parameter 1 to be resource, bool given in /home/vol17_2/ezyro.com/ezyro_32005085/htdocs/render/public/chapter.req.php on line 36



$files = array();
$dir = opendir("../../data/chapters/".$chapter["slug"]); // open the cwd..also do an err check.
while(false != ($file = readdir($dir))) {
if(($file != ".") and ($file != "..") and ($file != "index.php")) {
$files[] = $file;


My Answer:
../../data/chapters/PLH8G-BmfHh-ccc0h-Vp7wh);

It seems like the directory "../../data/chapters/PLH8G-BmfHh-ccc0h-Vp7wh" does not exist on the server. Make sure that the directory structure is correct and that the necessary folders and files are uploaded to the server.

You may need to check the file paths and permissions on the server to ensure that the script can access the directories and files properly. Additionally, make sure that the directory exists and is accessible by the web server.

If the issue persists, you may need to contact your hosting provider for further assistance in resolving the problem.

Rate this post

4 of 5 based on 7846 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us