简体   繁体   English

不是PHP中的Bom角色,而是-弄乱了我的风格

[英]Not a Bom character in PHP but a - messing up my styles

I Have just updated the question to a much more basic version: You can view the source code at http://www.3d-casino-game.com/da/sitemap.asp in notepad to see what I am talking about: 我刚刚将问题更新为更基本的版本:您可以在记事本中的http://www.3d-casino-game.com/da/sitemap.asp上查看源代码,以了解我在说什么:

In notepad the <title> tag is in a different font size as all the rest of the characters. 在记事本中, <title>标签与所有其他字符的字体大小不同。 The problem that I am having is that there is a - character included in the page each time that I use a php include: 我遇到的问题是,每次使用php时,页面中都会包含一个-字符:

Here is a basic page: 这是一个基本页面:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<?php include($_SERVER['DOCUMENT_ROOT'].'/includes/head.php');?>
</head>

<body>
</body>
</html>

and the included page is exactly like this: 包含的页面完全是这样的:

<title>3D Casino Games</title>
<link href="http://www.3d-casino-game.com/css/3d-casino-game.css" rel="stylesheet" type="text/css" />

Why is the special character there? 为什么那里有特殊字符?

Did you check /includes/javascript.php ? 您检查了/includes/javascript.php吗? It probably has a new line before the <?php tag or inside it ( as output ). 它可能在<?php标记之前或内部有一个新行(作为输出)。

Try to include the javascript file in another clean file and check if the new line is still present. 尝试将javascript文件包含在另一个干净文件中,然后检查新行是否仍然存在。

Could be as simple as your javascript.php not outputting anything. 就像您的javascript.php一样简单,什么也不输出。 This could be due to an error in the javascript.php file and you have display_errors off. 这可能是由于javascript.php文件中的错误而导致display_errors关闭。 Check the PHP error log if error_logging is on. 如果error_logging打开,请检查PHP错误日志。

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

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