MySQL用于PHP的库,对数据库进行操作
时间:2007-02-17 来源:PHP爱好者
<?
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
/*
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* Utility routines for MySQL.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*/
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
class MySQL_class {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
var $db, $id, $result, $rows, $data, $a_rows;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
var $user, $pass, $host;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
/* Make sure you change the USERNAME and PASSWORD to your name and
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* password for the DB
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*/
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Setup ($user, $pass) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->user = $user;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->pass = $pass;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Create ($db) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
if (!$this->user) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->user = "USERNAME"; /* 在这里作修改 */
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
if (!$this->pass) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->pass = "PASSWORD"; /* 在这里作修改 */
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->db = $db;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->id = @mysql_pconnect($this->host, $this->user, $this->pass) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg("Unable to connect to MySQL server: $this->host : '$SERVER_NAME'");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->selectdb($db);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function SelectDB ($db) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
@mysql_select_db($db, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to select database: $db");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Use this function is the query will return multiple rows. Use the Fetch
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# routine to loop through those rows.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Query ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->rows = @mysql_num_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Use this function if the query will only return a
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# single data element.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function QueryItem ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->rows = @mysql_num_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->data = @mysql_fetch_array($this->result) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to fetch data from query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
return($this->data[0]);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# This function is useful if the query will only return a
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# single row.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function QueryRow ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->rows = @mysql_num_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->data = @mysql_fetch_array($this->result) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to fetch data from query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
return($this->data);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Fetch ($row) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
@mysql_data_seek($this->result, $row) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to seek data row: $row");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->data = @mysql_fetch_array($this->result) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to fetch row: $row");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Insert ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform insert: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Update ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform update: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Delete ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform Delete: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
/* ********************************************************************
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* MySQL_ErrorMsg
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* Print out an MySQL error message
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*/
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function MySQL_ErrorMsg ($msg) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Close out a bunch of HTML constructs which might prevent
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# the HTML page from displaying the error text.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
echo("</ul></dl></ol>n");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
echo("</table></script>n");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Display the error message
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$text = "<font color="#ff0000" size=+2><p>Error: $msg :";
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$text .= mysql_error();
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$text .= "</font>n";
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
die($text);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
?>
php爱好者站 http://www.phpfans.net 网页制作|网站建设|数据采集.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
/*
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* Utility routines for MySQL.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*/
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
class MySQL_class {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
var $db, $id, $result, $rows, $data, $a_rows;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
var $user, $pass, $host;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
/* Make sure you change the USERNAME and PASSWORD to your name and
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* password for the DB
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*/
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Setup ($user, $pass) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->user = $user;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->pass = $pass;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Create ($db) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
if (!$this->user) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->user = "USERNAME"; /* 在这里作修改 */
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
if (!$this->pass) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->pass = "PASSWORD"; /* 在这里作修改 */
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->db = $db;
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->id = @mysql_pconnect($this->host, $this->user, $this->pass) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg("Unable to connect to MySQL server: $this->host : '$SERVER_NAME'");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->selectdb($db);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function SelectDB ($db) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
@mysql_select_db($db, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to select database: $db");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Use this function is the query will return multiple rows. Use the Fetch
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# routine to loop through those rows.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Query ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->rows = @mysql_num_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Use this function if the query will only return a
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# single data element.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function QueryItem ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->rows = @mysql_num_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->data = @mysql_fetch_array($this->result) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to fetch data from query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
return($this->data[0]);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# This function is useful if the query will only return a
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# single row.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function QueryRow ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->rows = @mysql_num_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->data = @mysql_fetch_array($this->result) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to fetch data from query: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
return($this->data);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Fetch ($row) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
@mysql_data_seek($this->result, $row) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to seek data row: $row");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->data = @mysql_fetch_array($this->result) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to fetch row: $row");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Insert ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform insert: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Update ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform update: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function Delete ($query) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->result = @mysql_query($query, $this->id) or
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
MySQL_ErrorMsg ("Unable to perform Delete: $query");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$this->a_rows = @mysql_affected_rows($this->result);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
/* ********************************************************************
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* MySQL_ErrorMsg
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
* Print out an MySQL error message
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
*/
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
function MySQL_ErrorMsg ($msg) {
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Close out a bunch of HTML constructs which might prevent
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# the HTML page from displaying the error text.
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
echo("</ul></dl></ol>n");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
echo("</table></script>n");
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
# Display the error message
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$text = "<font color="#ff0000" size=+2><p>Error: $msg :";
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$text .= mysql_error();
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
$text .= "</font>n";
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
die($text);
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
}
www.chinaitpower.com88YmfT3wRkmXbYbRtphoFlBgj
?>
php爱好者站 http://www.phpfans.net 网页制作|网站建设|数据采集.
相关阅读 更多 +