0

嘿伙计们,所以我用 php 5.1.6 在我的旧服务器上一切正常,我有这个脚本:

<? session_start(); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<?
$name = $_SESSION['name'];
print $name;
if (empty($name)){
print "
<link rel=stylesheet href=css/screen2.css media=screen />
<form id=contactform class=rounded method=post action=panelBackend.php>
<h3>Login</h3>

<div class=field>
<label for=name>Username:</label>
<input type=text class=input name=name id=name />
<p class=hint>Minecraft Username.</p>
</div>

<div class=field>
<label for=password>Password:</label>
<input type=password class=input name=password id=password />
<p class=hint>Free Minecraft Host Password.</p>
</div>

<input type=submit name=Login  class=button value=Login />
</form>";
} else {
header( 'Location: http://x.x.x.x/panelBackend.php' );
}
?>

在它工作正常之前!现在,当我转到它时,我得到了没有样式的表单,它在底部打印出这个 php 代码:

"; } else { header( 'Location: http://69.64.80.200/panelBackend.php' ); } ?>

PHP 版本有什么不同吗?

4

1 回答 1

1

是的。新的没有启用短标签。全部更改<?<?php.

于 2012-04-25T03:17:45.490 回答