Welcome Guest, Not a member yet? Register   Sign In
Defined constants - FCPATH
#1

Hi

I got a problem with defined constant. FCPATH...
...
// Path to the front controller (this file)
define('FCPATH', dirname(__FILE__).'/');
...
exactly the part '/' makes problem to me.
in windows local, this code:

$path = FCPATH . $folder;
echo $path;

is generating something like:

D:\xampp\docs\domain/orders

And it's a problem. Easy way to correct this, is to use DIRECTORY_SEPARATOR instead of '/'.
But it isn't very good practice to edit index.php file.

Please give me an idea, what is the best to do...

Thanks.
Reply


Messages In This Thread
Defined constants - FCPATH - by Sezu - 03-12-2016, 02:50 AM
RE: Defined constants - FCPATH - by Narf - 03-12-2016, 10:04 AM
RE: Defined constants - FCPATH - by skunkbad - 03-12-2016, 03:55 PM
RE: Defined constants - FCPATH - by ivantcholakov - 03-12-2016, 07:01 PM
RE: Defined constants - FCPATH - by Sezu - 03-13-2016, 12:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB