ECHO MYSQL结果显示空白页 [英] ECHO MYSQL RESULT DISPLAY BLANK PAGE

查看:144
本文介绍了ECHO MYSQL结果显示空白页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道它一定是简单的东西,但我不能做

我需要将文本显示到DIV中



像这样:

 < div> 
< p>< font color =#bdbdbd> TEXTO FROM MYSQL< / font>< / p>
< / div>

我的表格结构是:

<$ p $ ($)$ p $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $' $ b

您可以在这里看到我的代码:loja.genesis / depoimentos / testemysql.html

  $ sql =SELECT * FROM views ORDER BY id DESC LIMIT 15; 
$ resultado = mysql_query($ sql);

while($ linha = mysql_fetch_array($ resultado)){
$ depoimento = $ linha [depoimento];
$ client = $ linha [client];
回声$ depoimento;
echo$ client;
}
?>

但它仍然出现在空白处我正在使用SEMI专用服务器(VPS)



有什么想法?



谢谢!

解决方案

重命名 loja.genesis / depoimentos / testemysql.html loja.genesis / depoimentos / testemysql.php

 < div> 
< p>
< font color =#bdbdbd>
<?php
$ sql =SELECT * FROM views ORDER BY id DESC LIMIT 15;
$ resultado = mysql_query($ sql);
while($ linha = mysql_fetch_array($ resultado)){
$ depoimento = $ linha [depoimento];
$ client = $ linha [client];
回声$ depoimento;
echo$ client;
}
?>
< / font>
< / p>
< / div>


I know it must be something simple but I can't do

I need display the text into a DIV

Like this:

<div>
  <p><font color="#bdbdbd">TEXTO FROM MYSQL</font></p>
</div>

My table structure is:

id          int(11)         Nulo: Não   Padrão:Nenhum  AUTO_INCREMENT
depoimento  varchar(255)    utf8_unicode_c…  NULL
client      varchar(60)     utf8_unicode_ci  Nulo:Sim   Pa… NULL

You can see my code in action here: loja.genesiseries/depoimentos/testemysql.html

$sql = "SELECT * FROM opinions ORDER BY id DESC LIMIT 15";
$resultado = mysql_query($sql);

while ($linha=mysql_fetch_array($resultado)) {
    $depoimento = $linha["depoimento"];
    $client = $linha["client"];
    echo "$depoimento";
    echo "$client";
}
?>

But it still appearing in blank I'm using a SEMI DEDICATED SERVER (VPS)

Any idea?

Thanks!

解决方案

Rename loja.genesiseries/depoimentos/testemysql.html to loja.genesiseries/depoimentos/testemysql.php

<div>
    <p>
        <font color="#bdbdbd">
            <?php
            $sql = "SELECT * FROM opinions ORDER BY id DESC LIMIT 15";
            $resultado = mysql_query($sql);
            while ($linha=mysql_fetch_array($resultado)) {
                $depoimento = $linha["depoimento"];
                $client = $linha["client"];
                echo "$depoimento";
                echo "$client";
            }
            ?>
        </font>
    </p>
</div>

这篇关于ECHO MYSQL结果显示空白页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆