Welcome Guest, Not a member yet? Register   Sign In
Linux/Win paths
#1

[eluser]zlatiborac[/eluser]
My localhost is under Win and my production server is Linux based. I was trying to define some paths like this:
Code:
define('SMALL_IMAGE',str_replace('/application/config/constants.php','',__FILE__));
and this works under Linux but not under Win. So I had to change slash to backslash like this
Code:
define('SMALL_IMAGE',str_replace('\application\config\constants.php','',__FILE__));
and now it works under Win and not under Linux Smile
This is a small problem for me which I easily resolved by entering two different define sections in constants.php. But I am interested in hearing how you managed this problem. And what if I have more defines.
#2

[eluser]Buso[/eluser]
try using PATH_SEPARATOR




Theme © iAndrew 2016 - Forum software by © MyBB