1.在PHP集成环境WampServer下,添加“company”数据库,建立“employee”表,表结构和添加的数据如下:
2.将showdata.asp文件添加在所建立的站点下
showdata.asp文件代码如下:
<?php require_once('Connections/company.php'); ?>
<?php
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

这篇博客讲述了在PHP集成环境WampServer中遇到的MySQL中文显示为?号的问题,以及如何通过设置字符集解决。同时,文章还提到了因使用废弃的mysql扩展导致的警告信息,并提供了三种解决方案,包括禁用PHP错误显示、切换到mysqli连接以及调整报警级别。
最低0.47元/天 解锁文章
5207

被折叠的 条评论
为什么被折叠?



