查看文件: BEB2.php
大小: 1.31 KB
类型: application/octet-stream
<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_BEB2 = "localhost"; $database_BEB2 = "swin"; $username_BEB2 = "root"; $password_BEB2 = "loskyoc"; $BEB2 = mysql_pconnect($hostname_BEB2, $username_BEB2, $password_BEB2) or trigger_error(mysql_error(),E_USER_ERROR); if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } mysql_query("SET NAMES UTF8"); ?>
保存
取消
返回文件列表