简体   繁体   English

测试header.php中的URL

[英]Test on URL in header.php

I'm trying to put different breadcrumb following the URL so I put that code at the end of my header.php file: 我试图将不同的面包屑放在URL后面,因此我将该代码放在header.php文件的末尾:

<div class="fil_ariane">

<?php 
$url= $_SERVER['Query_String'];
if(strpos($url, 'property')){
    echo'<a href="javascript:history.go(-1)">< Retour</a>';
}else{
if ( function_exists( 'yoast_breadcrumb' ) ) {
    yoast_breadcrumb();

}} ?>

</div>

Everything is working except the echo 除了回声,一切都正常

Any Idea ? 任何想法 ?

Your code seems to be correct, but you missed semicolon after the echo. 您的代码似乎是正确的,但是在回显之后您错过了分号。 If your code is same you pasted then that might be a problem. 如果您粘贴的代码相同,则可能是一个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM