我的PHP代码runnig很好,我的本地主机没有任何错误,但没有在服务器上运行! [英] my php code runnig nicely without any error in my local host but not running on server !!

查看:73
本文介绍了我的PHP代码runnig很好,我的本地主机没有任何错误,但没有在服务器上运行!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们!!



我的php代码运行良好,我的本地主机没有任何错误,但没有在服务器上运行!!

它显示错误我使用php的mysqli_numrows(),mysqli_fetchrows()等,它显示这样的错误

警告:mysqli_num_rows()期望参数1是mysqli_result,布尔值在/ home / maxdudes / public_html中给出第97行/gujaratraksha.in/index.php



警告:mysqli_fetch_row()要求参数1为mysqli_result,在/ home / maxdudes / public_html / gujaratraksha中给出布尔值第131行.in / index.php



警告:mysqli_fetch_row()要求参数1为mysqli_result,在/home/maxdudes/public_html/gujaratraksha.in中给出布尔值第136行/index.php



我的代码在这里



Hi friends !!

my php code runnig nicely without any error in my local host but not running on server !!
it shows error where i use php's mysqli_numrows(),mysqli_fetchrows() etc, it showing errors like this
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/maxdudes/public_html/gujaratraksha.in/index.php on line 127

Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/maxdudes/public_html/gujaratraksha.in/index.php on line 131

Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/maxdudes/public_html/gujaratraksha.in/index.php on line 136

my code is here

<pre lang="PHP">
include_once("db_conx.php");                              
$xbt = "SELECT * from photo_upload";
$query1 = mysqli_query($con,$xbt);
$rows = mysqli_num_rows($query1); 
   
$last_date = "SELECT SrNo,Upload_Date from photo_upload WHERE SrNo='$rows'";
$query_date = mysqli_query($con,$last_date);

$last_inserted_date = mysqli_fetch_row($query_date);
echo $last_inserted_date[1];

$sql = "SELECT Img_Location from photo_upload WHERE Upload_Date = '$last_inserted_date[1]'";
$query = mysqli_query($con,$sql);
while($result = mysqli_fetch_row($query)){		
echo '<img src="'.$result[0].'" alt="" class="col-lg-12" >';
}		

推荐答案

xbt =SELECT * from photo_upload;
xbt = "SELECT * from photo_upload";


query1 = mysqli_query(
query1 = mysqli_query(


con,


这篇关于我的PHP代码runnig很好,我的本地主机没有任何错误,但没有在服务器上运行!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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