Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
致命错误:在第14行的/home/u545753064/public_html/index.php中调用未定义的函数mysqli_fetch_rows()_Php_Mysqli - Fatal编程技术网

致命错误:在第14行的/home/u545753064/public_html/index.php中调用未定义的函数mysqli_fetch_rows()

致命错误:在第14行的/home/u545753064/public_html/index.php中调用未定义的函数mysqli_fetch_rows(),php,mysqli,Php,Mysqli,我需要这个代码为我在学校的项目,请帮助我这个 代码,我不能完全理解mysqli,尤其是它的功能,我们的 教授们教我们mysql,而不是mysql,所以我需要帮助 在mysqli中,如果可能,您可以重写它,非常感谢** PHP图像上传 PHP学校 数据库中的PHP图像上传 图像名称 上传图像 “style=”高度:100px;" > 这是因为没有函数mysqli_fetch_rows()-但是有一个mysqli_fetch_row(),它返回一行。如果你不先连接并设置一个select就尝试提取,

我需要这个代码为我在学校的项目,请帮助我这个 代码,我不能完全理解mysqli,尤其是它的功能,我们的 教授们教我们mysql,而不是mysql,所以我需要帮助 在mysqli中,如果可能,您可以重写它,非常感谢**


PHP图像上传
PHP学校
数据库中的PHP图像上传
图像名称
上传图像
“style=”高度:100px;" >

这是因为没有函数
mysqli_fetch_rows()
-但是有一个
mysqli_fetch_row()
,它返回一行。

如果你不先连接并设置一个select就尝试提取,它不会工作……我在这里将它与我的另一个页面连接
<?php
        include('/home/u545753064/public_html/classes/image_class.php');

        $obj_image = new Image();

        if(@$_POST['Submit'])
        {
            $obj_image->image_name=str_replace("'", "''", $_POST['txt_image_name']);
            $obj_image->image=str_replace("'", "''", $_POST['txt_image']);

            $obj_image->insert_into_image();

            $data_image=$obj_image->get_all_image_list();
            $row=mysqli_fetch_rows($data_image); 
        }

    ?>

    <!DOCTYPE html>
    <html>
    <head>
        <title>PHP IMAGE UPLOAD</title>
    </head>
    <body>
        <center><h1>PHP SCHOOL</h1></center>
        <center><h1>PHP IMAGE UPLOAD IN DATABASE</h1></center>

        <center>
            <form method="post" enctype="multipart/form-data">
                <table border="1" width="80%">
                    <tr>
                        <th width="50%">IMAGE NAME</th>
                        <td width="50%">
                        <input type="text" name="txt_image_name">   
                        </td>
                    </tr>
                    <tr>
                        <th width="50%">UPLOAD IMAGE</th>
                        <td>
                        <input type="file" name="txt_image">
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input type="submit" name="Submit" value="SAVE">
                        </td>
                    </tr>
                </table>
            </form>
        </center>

        <?php
            if($row != 0)
            {
        ?>

        <center>
        <table width="80" border="1" >

                <?php
                $icount = 1;

                while ($data = mysqli_fetch_assoc($data_image)) 
                {
                ?>
                <tr>

                    <td style="text-allign:center" style="width:10%"><?php echo $icount; ?>
                    </td>
                    <td style="text-allign:center" style="width:10%"><?php echo $data['image_name']; ?>
                    </td>
                    <td style="text-allign:center" style="width:10%"><img src="images/<?php echo $data['image']; ?>" style="height:100px;" >
                    </td>
                </tr>
                <?php
                $icount++;
                }

                ?>
        </table>
        </center>   
        <?php
        }
        ?>
    </body>
    </html>