奇怪的查询结果/< title>问题 [英] Weird query results / <title> issues

查看:77
本文介绍了奇怪的查询结果/< title>问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家。


我正在编辑我去年夏天做的一些事情,试图修正并改进

的东西。一个改进(或对原始设计的监督)是

添加动态< title>标签到我的网页。这就是我最初的原因

构建我的php页面:


包括header.php(内容基本上是我的HTML / CSS直到

<! - 开始内容 - >点)

< php code>

包括footer.php(内容来自<! - 结束内容 - >以后)。


显然这意味着我有相同的< title>如header.php中所定义
每页的
,不酷。我仔细检查了结构,然后将结构修改为

这个:


包括doctype.php(HTML从开场文件声明到

就在< title>之前)

然后开始我的查询,一旦抓住结果:

echo"< title> $ bandName - recordName审查< / title" ;;

包括header.php(此文件现在包含以下所有内容< title>

至<! - begin content - > )

< php代码输出内容>

包括footer.php(如上所述)


这几乎适用于我的所有页面都只有一个。这是链接:

http:/ /www.threechords.org/spb/reviews/678


这可能看起来很正常,但请点击其他一些

左侧小组的评论。封面图片和标题保持不变,

和底部的作者信息保持不变,这是

当然不正确。我不知道我的代码出了什么问题,

所以我会发布我正在做的事情:

http://www.threechords.org/spb/revie...layreview.phps


该文件包含doctype.php,header.php和footer.php。

包含所以你也可以看到它们的内容(通常是''包含了

,含有php)。


关于为什么我无法使用它/我的代码有多糟糕的任何建议/>
结构化会非常有用。


马特

Hey everyone.

I''m editing some stuff I did last summer, trying to bugfix and improve
stuff. One improvement (or an oversight of the original design) is
adding dynamic <title> tags to my pages. Here''s how I originally
structured my php pages:

include header.php (contents are basically my HTML/CSS up to the
<!--begin content--> point)
<php code>
include footer.php (contents are from <!--end content--> onwards).

Obviously this meant I had the same <title> as defined in header.php
for every page, not cool. I went through and revised the structure to
this:

include doctype.php (HTML from the opening document declaration down to
just before <title>)
Then began my query(s), and once the results were grabbed:
echo "<title>$bandName - recordName review</title";
include header.php (this file now contains everything below <title>
down to <!--begin content-->)
<php code to output content>
include footer.php (as above)

This worked great for almost all of my pages but one. Here''s the link:

http://www.threechords.org/spb/reviews/678

This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I''m not sure where I''m going wrong with my code,
so I''ll post up what I''m doing:

http://www.threechords.org/spb/revie...layreview.phps

That file has doctype.php, header.php and footer.php physically
included so you can see their contents too (ordinarily they''re included
with php includes).

Any advice as to why I can''t get this to work/ how terrible my code
structuring is would be really helpful.

Matt

推荐答案

bandName - recordName review< / title" ;;

包括header.php(此文件现在包含以下所有内容< title>

至<! - 开头内容 - >)

< php代码输出内容>

包括footer.php(如上所述)


这个我的几乎所有页面都很好用但只有一个。这是链接:

http:/ /www.threechords.org/spb/reviews/678


这可能看起来很正常,但请点击其他一些

左侧小组的评论。封面图片和标题保持不变,

和底部的作者信息保持不变,这是

当然不正确。我不知道我的代码出了什么问题,

所以我会发布我正在做的事情:

http://www.threechords.org/spb/revie...layreview.phps


该文件包含doctype.php,header.php和footer.php。

包含所以你也可以看到它们的内容(通常是''包含了

,含有php)。


关于为什么我无法使用它/我的代码有多糟糕的任何建议/>
结构化会非常有用。


马特

bandName - recordName review</title";
include header.php (this file now contains everything below <title>
down to <!--begin content-->)
<php code to output content>
include footer.php (as above)

This worked great for almost all of my pages but one. Here''s the link:

http://www.threechords.org/spb/reviews/678

This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I''m not sure where I''m going wrong with my code,
so I''ll post up what I''m doing:

http://www.threechords.org/spb/revie...layreview.phps

That file has doctype.php, header.php and footer.php physically
included so you can see their contents too (ordinarily they''re included
with php includes).

Any advice as to why I can''t get this to work/ how terrible my code
structuring is would be really helpful.

Matt


任何人?

Anyone?


这可能看起来很正常,但请尝试点击左侧面板中的其他一些
评论。封面图片和标题保持不变,
和底部的作者信息保持不变,这当然是不正确的。我不确定我的代码在哪里出错了,
所以我会发布我正在做的事情:

http://www.threechords.org/spb/revie...layreview.phps
This might look normal to you, but try clicking some of the other
reviews in the left panel. The cover image and headings stay the same,
and the author information at the bottom again stays the same, which is
of course incorrect. I''m not sure where I''m going wrong with my code,
so I''ll post up what I''m doing:

http://www.threechords.org/spb/revie...layreview.phps




我明白这一点:


mysql_query(



I see this:

mysql_query(


这篇关于奇怪的查询结果/&lt; title&gt;问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆