<?php
$agent=getenv("HTTP_USER_AGENT");
if(preg_match("/MSIE/i", "$agent")){
$result="You are using Microsoft Internet Explorer.";}
else if (preg_match("/Mozilla/i", "$agent")){
$result= "You are using Firefox.";}
else {$result = " you are using $agent.";}
?>
<html>
<head>
<title>Browse Match Results</title>
</head>
<body>
<?php "<p>$result</p>";?>
</body>
</html>
答案 0 :(得分:2)
我可能冒昧地猜测,并建议:
<?php "<p>$result</p>";?>
应该是:
<?php echo "<p>$result</p>";?>
答案 1 :(得分:0)
<?php
回声 "<p>$result</p>";?>