Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我需要不同的标志,以了解网页和其他网页在php?_Php_Codeigniter - Fatal编程技术网

我需要不同的标志,以了解网页和其他网页在php?

我需要不同的标志,以了解网页和其他网页在php?,php,codeigniter,Php,Codeigniter,我试图实现这样的标志区分,请找出一个问题,谢谢 到目前为止,我如何更改徽标 @if($title == 'About' ){ <img src = "files/images/logo_wta_white.png" srcset = "files/images/logo_wta_white.png 1x, files/images/logo_wta_white@2x.png 2x" alt = "logo_wta_white"> @else <img src =

我试图实现这样的标志区分,请找出一个问题,谢谢 到目前为止,我如何更改徽标

@if($title == 'About' ){
    <img src = "files/images/logo_wta_white.png" srcset = "files/images/logo_wta_white.png 1x, files/images/logo_wta_white@2x.png 2x" alt = "logo_wta_white">
@else
    <img src = "files/images/logo_wta.png" srcset = "files/images/logo_wta.png 1x, files/images/logo_wta@2x.png 2x" alt = "logo_wta">
@endif
@if($title==“About”){
@否则
@恩迪夫
用于核心php

if(basename($_SERVER['PHP_SELF']) == "about.php"){ /* basename($_SERVER['PHP_SELF']) Returns The Current PHP File Name */
<img src = "files/images/logo_wta_white.png" srcset = "files/images/logo_wta_white.png 1x, files/images/logo_wta_white@2x.png 2x" alt = "logo_wta_white">
}else{
<img src = "files/images/logo_wta.png" srcset = "files/images/logo_wta.png 1x, files/images/logo_wta@2x.png 2x" alt = "logo_wta">
}
if(basename($\u SERVER['PHP\u SELF'])==“about.PHP”){/*basename($\u SERVER['PHP\u SELF'])返回当前的PHP文件名*/
}否则{
}


哪里定义了“$title”变量?使用哪个值?使用哪个框架?您可以使用url比较来完成。
<?php
if(strcmp($title ,"About") ==0)
{?>
<img src="files/images/logo_wta_white.png" 
srcset ="files/images/logo_wta_white.png 1x, 
files /images/logo_wta_white@2x.png 2x" 
alt ="logo_wta_white">
<?php
} else {
?>
<img src="files/images/logo_wta.png" 
srcset ="files/images/logo_wta.png 1x, 
files /images/logo_wta@2x.png 2x" alt="logo_wta">
<?php
}
?>