Need help to connect to mysql database


error msg: Warning : include(includes/config/connect): failed to open stream: No such file or directory in /home/vol5_7/ on line 11

i need help to include my connect.php file in index.php page because of the above error while both ‘includes folder’ and ‘index.php’ being in the same htdocs folder

What you must include is connect.php not connect.
And includes folder (due to configurations) is not accessible, you’ve to rename includes folder to something else.

1 Like

@anon19508339 Thankyou so much i was stuck in this for days not knowing i cant name a folder as includes, once again thanks a lot.

No, this should actually be fine. The includes folders are not web accessible, but they are accessible from PHP scripts. That’s kind of the point, PHP scripts in the includes folder should ONLY be include()d into other scripts, not be accessed directly from the web.

1 Like

I see! But does samething also apply for errors folder?

The errors folder is more of a bug than intentional behavior. But that’s also controlled by web request routing, not PHP file management. So if you place a file in the errors folder and read that file from PHP, it should just work too.


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.