Advertisement:

Author Topic: Problema with $_SERVER['SCRIPT_FILENAME']  (Read 1838 times)

SirFran

  • Newbie
  • *
  • Posts: 18
Problema with $_SERVER['SCRIPT_FILENAME']
« on: December 02, 2011, 02:30:09 am »
Hi

My problem is that in my host, this instruction  define('ABS_PATH', dirname(dirname($_SERVER['SCRIPT_FILENAME'])) . '/'); recuperate backslash '\' and not '/'
All the program is making to use '/' and in some parts it produce errors.
I fixed the problem temporarily using str_replace('\\','/',dirname(dirname($_SERVER['SCRIPT_FILENAME'])) but I want find a solution more optimum.

I read some documentation and some times this function return "/.../../" and in others ocasions returns "c:\..\...\" but when I run the program in my XP the funciton works well.

Any idea?
maybe it's a directive from php or from the server?

Greetings
Sorry for my English I'm from Spain.

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: Problema with $_SERVER['SCRIPT_FILENAME']
« Reply #1 on: December 07, 2011, 06:37:59 pm »
Reading about this issue... It's something we should modify in OSClass because windows understands fine / and \ (at least, it's what i've read in stackoverflow)