I implemented a simple MVC pattern on my site and it works fine on my pc using XAMPP. Now I want to host the site here but had some problems. This GitHub respository shows how my files are organized on 000webhost file manager.
Should I put ALL files inside the public_html folder (including models, views, controllers) or only the general MVC public content (primary index.php, css, js…) like I did?
Why am I getting the following error when oppening the site?
Warning: require_once(…/app/controllers/home.php): failed to open stream: No such file or directory in /storage/h6/242/1091242/app/core/App.php on line 20
I’ve tried your suggestion but it didn’t worked. I get HTTP ERROR 500. I can tell that the path ../app/init.php is working as the error occurs at app/core/App.php line 20 which is a file required in init.php.
I discovered the problem. The path ../app/controllers/home.php does not find the file because the file is Home.php (uppercased H). I didn’t realized this because it works fine in my pc with XAMPP. I believe that XAMPP’s Apache is configured in a way that allows case insensitive URLs which does not happens in 000webhost and I don’t know how to do it.