Jump to content

Help if statement


monkeybidz

Recommended Posts

Use this instead.

 

<?php
$server_page = filter_var("http://".$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'], FILTER_SANITIZE_STRING);
echo $server_page."<br />";
$current_page = end(explode("/", $server_page));
if($current_page == "index.php") {
echo "this";
} else {
echo "that";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/241549-help-if-statement/#findComment-1240727
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.