<?php
define('EACH_PAGE',40);
 
 
 include("adodb5/adodb.inc.php");  //这个总是提示出错
 
      $host="localhost";
      $user="ceshi001";
      $pass="123456";
      $db="ceshi001";
     //设置链接mysql数据的变量
     //建立链接对象
     $conn=&ADONewConnection('mysql');
     //链接数据库
     $conn->connect($host,$user,$pass,$db);
     //设置字符集
 $db->debug = 0
   $db->setFetchMode(ADODB_FETCH_ASSOC);
   
   
//输出URL地址
function url($url,$text='',$attr='',$target='_self')
{
if(empty($text))
$text=$url;return'<a hre="'.$url.'"target="'.$target.'"'.$attr.'>'.$text.'</a>';}

//格式化字符串function h($html)
{if(isset($html)){
$html=str_replace(' ','&nbsp;',$html);return htmlspecialchars ($html);
}else{
retun '';
}
}?>

解决方案 »

  1.   

    没错啊。 Parse error: syntax error, unexpected T_REQUIRE_ONCE in /home/common.php on line 5
      

  2.   

          $host="localhost";
          $user="ceshi001";
          $pass="123456";
          $data="ceshi001";
         //设置链接mysql数据的变量
         //建立链接对象
         $db=&ADONewConnection('mysql');
         //链接数据库
         $db->connect($host,$user,$pass,$data);
         //设置字符集
     $db->debug = 0
       $db->setFetchMode(ADODB_FETCH_ASSOC);
    ---------------还是提示错误。
      

  3.   

    //1、第3行中文空格删除
    //2、第17行$db->debug = 0前面的中文空格删除
    //3、第17行$db->debug = 0没结束符好";"
    //4、第43行retun应该是ruturn
      

  4.   

    @kyzy_yy_pm非常感谢你。 你怎么知道,那前面有中文的空格呢?