Folder access

pls i need help i want my index.php to be able to access other folder from htdoc pls asap

PHP scripts on InfinityFree are restricted to access files within their own domain only. It’s not possible for code on one domain to access the files on another domain (even within the same account).

If you don’t want this, you will have to upgrade your account.

but not from a different domain , it just a file trying to access a folder as an Include file

Include function is working well anywhere including here, AFAIK. Maybe you forgot to reconfig the path?

but i try these in my local host and it work fine (well)

@Hollami said:
but i try these in my local host and it work fine (well)

Check the path of file to check whether it’s correct or not.

If you happen to use dynamic path, I’d suggest to use $_SERVER['PHP_SELF'] instead of dirname(xxx). Localhost and here (server) does have slightly different path.

no dynamic path

@Hollami said:
but not from a different domain , it just a file trying to access a folder as an Include file

That should work exactly as you expect. What do you see when you try to include the file? Do you have an example URL I can check?

Warning: include_once(admin/include/Database.php): failed to open stream: No such file or directory in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php on line 6

Warning: include_once(): Failed opening ‘admin/include/Database.php’ for inclusion (include_path=‘.:/usr/share/pear/’) in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php on line 6

Fatal error: Uncaught Error: Class ‘Database’ not found in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php:10 Stack trace: #0 {main} thrown in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php on line 10

@Hollami said:
Warning: include_once(admin/include/Database.php): failed to open stream: No such file or directory in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php on line 6

Warning: include_once(): Failed opening ‘admin/include/Database.php’ for inclusion (include_path=‘.:/usr/share/pear/’) in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php on line 6

Fatal error: Uncaught Error: Class ‘Database’ not found in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php:10 Stack trace: #0 {main} thrown in /home/vol10_1/epizy.com/epiz_22422732/gbolebank.ga/htdocs/index.php on line 10

You called the folder Include, not include. Our servers run on Linux (like 99% of all hosting servers), and Linux systems, unlike Windows, have case sensitive file and directory names.

Solved thanks so much , but still i have one more Question …now my landing page is trying to access another folder file but i am receiving 404 error

@Hollami said:
Solved thanks so much , but still i have one more Question …now my landing page is trying to access another folder file but i am receiving 404 error

Which other folder file are you referring to? Which URL are you trying to access but doesn’t work?