错误提示:Parse error: syntax error, unexpected $end in C:\wwwroot\user manger\conn.php on line 48下面源码:
<?php
 $conn=mysql_connect("localhost","root","root");
 mysql_select_db('user_manager',$conn);
 function islogin()
  {
   if(isset($_COOKIE["usernmae"]) and isset($_COOKIE["password"]))
    {
  $rs="select id from memebers where username='".$_COOKIE["username"]."' and password = '".$_COOKIE["password"]."'";
  if($result=mysql_query($rs)<=0)
   {
    echo "<script>alert('please login');location.href='';</script>";
   }
}
  }
 function info($content,$url)
  {
  print <<<EOT
   <br />
   <table cellpadding="5" cellspacing="0" align="center">
    <tr>
 <th height="20" align="center">message</th>
</tr>
<tr>
 <td align="center">
  <table cellpadding="3" cellspacing="1" align="center">
 </td>
</tr>
<tr>
<td align="left">
<blockquote>
<br />
{$content}<br />
   
  please:<a target="_self" href="{$url}">[ click into page ]</a>
  <script>
   function nav()
    {
  location.href = "{$url}";
}
//three second
settimeout("nav()",3000);
   </script>
    </blockquote>
    </td></tr>
    </table>
    EOT;
    exit();
  }
?>----------------48行

解决方案 »

  1.   

     结尾的   EOT; 这行错了,好象前面多加了空格使用定界符要注意:结尾的一行,一定要另起一行,并且改行除了定界符结尾标识之外不能有任何其他字符,前后都不能有,包括空格。如果在本行最前或者最后出现空格,制表符的话,你会收到一个这样的错误信息:Parse error: parse error, unexpected $end in……,提示你语法错误;
      

  2.   

    Parse error: syntax error, unexpected $end
    --------------------48行有语法错误, 楼主详细检查一下
      

  3.   

    print < < <EOT 和 EOT;的行要独立, 不能有空格