<?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</tit开发者_如何学Gole>
</head>
<body>
<?php "<p>$result</p>";?>
</body>
</html>
Might I venture a guess, and suggest that:
<?php "<p>$result</p>";?>
Should be:
<?php echo "<p>$result</p>";?>
<?php
echo "<p>$result</p>";?>
精彩评论