浏览器运行以后总是出现空白页,然后查看源文件就发现没有php部分的代码?代码是下载的源码,是不是配置有问题啊?PHP浏览器

解决方案 »

  1.   

    之前调用 mysql_connect()函数时, 提示我 undefined function 
    然后我改了php.ini把mysql.dll和mysqli.dll打开了,还改了其他的配置
      

  2.   

    查看源文件是看不到php代码的,代码是不是没有页面输出,所以出现空白页呢
      

  3.   


    这是下的代码,我也不是很清楚,但是不是写了echo吗
      

  4.   

    将 <? 改为 <?php 再说,之后再看情况。
      

  5.   

    <?是短标记,需要在php.ini开启short_open_tag才能使用,建议不要使用短标记
      

  6.   

    汗——!以<?php开头,以?>结尾
      

  7.   

    php.ini 中 display_errors=On  重启服务器再运行看有不有错误信息。
      

  8.   

    那肯定是你if的条件是false,所以没显示啊
      

  9.   

    我在浏览器里输入的http://127.0.0.1/webshop/product_info.php
      

  10.   

    查看源文件就发现没有php部分的代码
    这是正确的,php 代码不会出现在浏览器中!
      

  11.   

    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charsetgb2312" />
      <title>商品内容页</title>
      <link href="images/style.css" rel="Stylesheet" type="text/css" />
    </head>
    <body style="margin:0px 0px 0px 0px; text-align:center">
    <table border="1" cellspacing="0" cellpadding="0" style="width:100%">
    <tr><td width="250px">
    <?php require ('sub_newslist1.php');
          require ('sub_newslist2.php'); 
          require ('sub_productlist3.php');?> </td>
    <td valign="top" width="750px">
    <table border="1" cellspacing="0" cellpadding="0" width="100%">
     <?php   
        require_once("conn/Conn_DB.php");  //包含数据库链接文件  
      if($_GET["P_ID"]!="")
      {
       $pid = $_GET["P_ID"];  //商品编号
       $str = "select * from Product_Info where P_ID =".$pid;  //查询语句
       $arr = mysql_query( $str);  //执行SQL语句
       $result = mysql_fetch_array($arr);  //获取查询结果
    ?>
    </table>
    <table border="1" cellspacing="0" cellpadding="0" width="100%"> 
      <tr><td rowspan="4" width="300px"><img src='<?php echo $result["P_Image"];?>' width="250px" height="250px"/>  </td>
        <td width="450px"> <?php echo $result["P_Name"];?>  </td></tr>
      <tr><td> 市场价: <?php echo $result["P_MPrice"];?>
        会员价: <?php echo $result["P_VPrice"];?>  </td></tr>
      <tr> <td>  <?php echo $result["P_CreateTime"];?>  </td></tr>
      <tr> <td><a class="a1" href="shopcar_info.php?P_ID=<?php echo $result["P_ID"];?>">放入购物车</a></td></tr>
      <tr><td colspan="2">商品详细介绍</td></tr>
      <tr><td colspan="2"> <?php echo $result["P_Intro"];?>  </td></tr>
      <tr><td colspan="2"> <a class="a1" href="javascript:history.back(-1);" target="_self">返回</a> </td></tr>
      <?php
       } 
    ?> 
    </table>
    </td></tr></table>
    </body>
     </html>
      

  12.   

    本帖最后由 xuzuning 于 2013-06-16 13:51:29 编辑
      

  13.   

    为什么要这样写?显示404 Not Found