How to make in PHP to make the text show only on one page?

Now there is this :
if($_SERVER['REQUEST_URI'] = "/services") echo '11111111111';
else echo '2222222'
?>

But it captures the whole section that is inside services/

And it is only necessary for services.
July 12th 19 at 17:34
1 answer
July 12th 19 at 17:36
Solution
if($_SERVER['REQUEST_URI'] == "/services")
Tried did not work - erika_Kuhic commented on July 12th 19 at 17:39
if($_SERVER['REQUEST_URI'] == "/services") echo '11111111111';
else echo '2222222'
?>
not right returns 2222222 - erika_Kuhic commented on July 12th 19 at 17:42
: well, maybe it will Shine what is $_SERVER['REQUEST_URI'] ? - Justen59 commented on July 12th 19 at 17:45
For clarity do this:
<?
print_r($_SERVER['REQUEST_URI']);
if($_SERVER['REQUEST_URI'] == "/services") echo '11111111111';
else echo '2222222'
?>
- Ernestine_Yost commented on July 12th 19 at 17:48
/services/?clear_cache=Y - erika_Kuhic commented on July 12th 19 at 17:51
: here is the answer to your question. - Justen59 commented on July 12th 19 at 17:54
okay, but when I insert
if($_SERVER['REQUEST_URI'] == "/services/?clear_cache=Y ") echo '11111111111';
else echo '2222222'

Infa change only after flushing the cache. - erika_Kuhic commented on July 12th 19 at 17:57
Understood! Thank you))) Just this component of the Bitrix cached))) Put in HTML and it worked))) - erika_Kuhic commented on July 12th 19 at 18:00

Find more questions by tags PHP