<?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(' ',' ',$html);return htmlspecialchars ($html);
}else{
retun '';
}
}?>
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(' ',' ',$html);return htmlspecialchars ($html);
}else{
retun '';
}
}?>
解决方案 »
- #include的布局问题
- 学习php问题
- 网站上有一个zip文件,如何统计其下载次数
- 一个不带数据库的php空间,怎么样实现计数器的功能?
- 请问如何使用tpl文件 ?
- 求一个文件上传的php源代码?最好是同时能上传几个文件
- 各位那有windows下apache+mysql+php4三合一自动安装包可下载呀?
- 讨论对中文文章分行进行处理,但出现乱码的问题!在线等!
- 请问gd函数是否放在c:\php\extensions这个文件下就可以用了!php.ini中还要改什么吗?在线wait..
- 关于如何用程序自动生成二级域名?
- 请教一个关于php操作mysql的问题,希望大家帮忙。
- 从数据库中读出来的文字限制它的字符长度后变乱码了....在线等
$user="ceshi001";
$pass="123456";
$data="ceshi001";
//设置链接mysql数据的变量
//建立链接对象
$db=&ADONewConnection('mysql');
//链接数据库
$db->connect($host,$user,$pass,$data);
//设置字符集
$db->debug = 0
$db->setFetchMode(ADODB_FETCH_ASSOC);
---------------还是提示错误。
//2、第17行$db->debug = 0前面的中文空格删除
//3、第17行$db->debug = 0没结束符好";"
//4、第43行retun应该是ruturn