1

I have two servers. On one I have developed site and on other I should put the same site. Apache, php, mysql etc was set by two different people and I can't get access now to first person because he is on vacation. There is rather strange problem there. I have a func like this:

public function self() 
{
    return preg_split("/\./", $_SERVER['PHP_SELF'])[0];
}

When I put a code with funcs like this (index of array of result of fucntion) it just shows me white list instead of site like it was a php syntax mistake. I changed it to this:

public function self() 
{
    $res=preg_split("/\./", $_SERVER['PHP_SELF']);
    return $res[0];

}

And it works fine. Anyone here familiar with such behavior? May be I should install something additional to php? Of course I can replace all work with indexes like I did it here. But first, it takes some time, secondly I'm sure that there is much more easier solution. Advice me smth=)

Sergey Scopin
  • 2,217
  • 9
  • 39
  • 67

0 Answers0