- 主题:wforum出现问题语法错误
在ubuntu7.10下安装,kbs的snapshot和wforum,
term和自带的web都可以正常使用,但是wforum一打开就出现如下问题:
Parse error: syntax error, unexpected T_STRING in /home/htdocs/wforum/inc/funcs.php on line 275
我的php版本是4。4。3
相关的代码如下:
function html_init($charset="",$otherheader="",$is_mathml=false)
{
global $cachemode;
global $HTMLTitle;
global $HTMLCharset;
global $DEFAULTStyle;
global $stats;
//session_start();
if ($charset==""){
$charset=$HTMLCharset;
}
$title = $HTMLTitle;
if (isset($stats) ){
$title = $title . ' -- ' . $stats;
}
if ($cachemode=="") {
cache_header("nocache");
}
if ($is_mathml) {
if (strpos($_SERVER["HTTP_USER_AGENT"], "MSIE") === false) {
$eee = " encoding=\"$charset\"";
} else {
$eee = ""; //fuck, IE doesn't understand that.
if (stristr($_SERVER["HTTP_USER_AGENT"], "MathPlayer") === false) {
$is_mathml = false;
}
}
}
if ($is_mathml) {
header("Content-Type: application/xhtml+xml");
?>
275 :<?xml version="1.0"<?php echo $eee; ?>?>
276: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:math="http://www.w3.org/1998/Math/MathML">
<?php
} else {
?>
<?xml version="1.0" encoding="<?php echo $charset; ?>"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>"/>
<title><?php echo $title; ?></title>
<link rel="stylesheet" type="text/css" href="css/ansi.css"/>
<link rel="stylesheet" type="text/css" href="css/common.css"/>
<script src="inc/browser.js" language="javascript"></script>
<script src="inc/funcs.js" language="javascript"></script>
<script type="text/javascript">
<!--
writeStyleSheets();
//-->
</script>
<?php echo($otherheader); ?>
</head>
<?php
}
--
FROM 124.78.9.*
php.ini short_open_tag 设置成 off
【 在 shenlang277 (Daemon) 的大作中提到: 】
: 在ubuntu7.10下安装,kbs的snapshot和wforum,
: term和自带的web都可以正常使用,但是wforum一打开就出现如下问题:
: Parse error: syntax error, unexpected T_STRING in /home/htdocs/wforum/inc/funcs.php on line 275
: ...................
--
FROM 128.12.150.*
对
我没有敢装wForum,担心多了不安全
【 在 atppp (Big Mouse) 的大作中提到: 】
: php.ini short_open_tag 设置成 off
--
FROM 202.97.138.*
275 :<?xml version="1.0"<?php echo $eee; ?>?>
<?xml version="1.0" encoding="<?php echo $charset; ?>"?>
就是这两句害的
【 在 atppp (Big Mouse) 的大作中提到: 】
: php.ini short_open_tag 设置成 off
--
FROM 202.97.138.*
多谢,回去试一试!
【 在 atppp (Big Mouse) 的大作中提到: 】
: php.ini short_open_tag 设置成 off
--
FROM 202.127.1.*
不看文档,唉
【 在 shenlang277 (Daemon) 的大作中提到: 】
: 多谢,回去试一试!
--
FROM 221.204.246.*
hehe ...
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 275 :<?xml version="1.0"<?php echo $eee; ?>?>
: <?xml version="1.0" encoding="<?php echo $charset; ?>"?>
: 就是这两句害的
: ...................
--
FROM 61.48.223.*
看来确实是应该好好看看,
只是看了安装的文档而已,
修改后果然没有问题了。
看文档去.....
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 不看文档,唉
--
FROM 124.78.8.*
赞qmd!
【 在 sxdxsimple (雾里龙虾) 的大作中提到: 】
: 对
: 我没有敢装wForum,担心多了不安全
--
FROM 218.249.124.11