I want to use relative root path in my PHP application. I am developing on windows.
- wwww
-my-api-2
-my-api-1
-config
-configuration.php
-inf
-appService.php
-index.php
appService.php is including configuration.php like this.
<?php
include_once "/config/Configuration.php";
index.php is including appService.php like this:
<?php
include_once "inf/appService.php";
This is working on windows, but not workin when uploaded on linux server. Warning is like this:
Warning: include_once(/inf/Configuration.php) [function.include-once]: failed to open stream: No such file or directory in /var/www/my-api-1/inf/appService.php on line 1
Solution is PHP case sensitive for file names. I am new in php so I noticed that developed APPS on windows may not work on linux because of case sensitive