-4

我在 wampserver 中的脚本有问题。它运行良好。但是在我的托管中,它不显示名为 classed.php?cat=[category_Name_Example] 的页面

    <?php header("Content-type: text/html; charset=utf-8"); 
?>
<?php include_once("analyticstracking.php") ?>

<?php
include 'includis/html_codes.php';
include 'includis/config.php';
$catID= mysql_real_escape_string($_GET['cat']);

switch ($catID)
{


  case 'javascript' :
  $catName = "javascript";
  $PageTitle = "Javascript  ";
  $img = "img/javascript.png";
  break;

  case 'htmlandcss' :
  $catName = "htmlandcss";
  $PageTitle = "html ";
  $img = "img/html2.png";
  break;

  default:header('location: /404');
}
if (!isset($catID)){
header ('Location 404.php');
}
if (empty($catID)){header ('Location 404.php');}

 include 'includis/db.php';

?>

请帮助谢谢 :)

4

1 回答 1

0

最可能的原因是您在调用此函数时没有打开的数据库连接。在这种情况下,mysql_real_escape_string 只返回 false。

于 2013-09-30T01:56:46.857 回答