Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/472.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
Javascript ajax调用中未显示评级小部件_Javascript_Ajax - Fatal编程技术网

Javascript ajax调用中未显示评级小部件

Javascript ajax调用中未显示评级小部件,javascript,ajax,Javascript,Ajax,我的问题是,当我使用ajax函数进行搜索和过滤时,我使用的星级插件()没有显示出来 当页面首次加载其工作状态良好时,将显示星级 但当我使用过滤和搜索功能时,星级就会消失。这张图片是我在下拉列表中选择动机的时候 这是主页的代码,其中包含图像、搜索和筛选功能 <div id="div-search" class="wow fadeInDown"> <div class="form-group inline-buttons">

我的问题是,当我使用ajax函数进行搜索和过滤时,我使用的星级插件()没有显示出来

当页面首次加载其工作状态良好时,将显示星级

但当我使用过滤和搜索功能时,星级就会消失。这张图片是我在下拉列表中选择动机的时候

这是主页的代码,其中包含图像、搜索和筛选功能

    <div id="div-search" class="wow fadeInDown">
        <div class="form-group inline-buttons">
            <div>
                <div class="input-group">
                     <span class="input-group-addon" style="min-width:150px;">Search</span>
                     <input type="text" name="search_text" id="search_text" placeholder="Search for name or topic" class="form-control"/>

                </div>
            </div>
        </div>

        <div class="input-group">
            <span class="input-group-addon" style="min-width:150px;">Filter</span>
                <select name="sortdrpdwn" id="sortdrpdwn" class="form-control" style="width:100%;">
                    <option value="all">All</option>
                    <option value="motivational">Motivational</option>
                    <option value="technology">Technology</option>
                    <option value="business">Business</option>
                    <option value="leadership">Leadership</option>
                    <option value="innovation">Sales</option>
                    <option value="entertainment">Entertainment</option>
                    <option value="healthcare">Health Care</option>
                </select>
        </div>
    <br>
    <div id="order_table" style="overflow-x:auto;"></div>  

<script>
$(document).ready(function()
{
    $('#sortdrpdwn').change(function()
    {
        var sortdrpdwn = $('#sortdrpdwn').val();  

            $.ajax({  
            url:"filterSp.php",  
            method:"POST",  
            data:{filter:sortdrpdwn},  
            success:function(data)  
            {  
               $('#order_table').html(data);  
            }  
            });  

    });

});
</script>

<script>
$(document).ready(function()
{
    $('#search_text').keyup(function()
    {
        var searchtext = $('#search_text').val();


            $.ajax({  
            url:"searchSp.php",  
            method:"POST",  
            data:{search:searchtext},  
            success:function(data)  
            {  
               $('#order_table').html(data);  
            }  
            });  


    });

});
</script>

<script>  
$(document).ready(function(){  
    load_data();  
    function load_data(page)  
    {   
    var sortdrpdwn = $('#sortdrpdwn').val(); 
    var searchtext = $('#search_text').val();

    if(searchtext != '')
    {
        $.ajax({  
        url:"searchSp.php",  
        method:"POST",  
        data:{search:searchtext},  
        success:function(data)  
        {  
           $('#order_table').html(data);  
        }  
        });  
    }
    else
    {
    $.ajax({  
        url:"filterSp.php",  
        method:"POST",  
        data:{filter:sortdrpdwn},  
        success:function(data)  
        {  
           $('#order_table').html(data);  
        }  
        });
    }           
    }  


});  
</script>  

搜寻
滤器
全部的
动机的
技术
生意
领导层
销售额
游戏娱乐
保健

$(文档).ready(函数() { $('#sortdrpdwn').change(function() { var sortdrpdwn=$('#sortdrpdwn').val(); $.ajax({ url:“filterSp.php”, 方法:“张贴”, 数据:{filter:sortdrpdwn}, 成功:功能(数据) { $('#order_table').html(数据); } }); }); }); $(文档).ready(函数() { $(“#搜索_文本”).keyup(函数() { var searchtext=$('#search_text').val(); $.ajax({ url:“searchSp.php”, 方法:“张贴”, 数据:{search:searchtext}, 成功:功能(数据) { $('#order_table').html(数据); } }); }); }); $(文档).ready(函数(){ 加载_数据(); 功能加载\u数据(第页) { var sortdrpdwn=$('#sortdrpdwn').val(); var searchtext=$('#search_text').val(); 如果(搜索文本!='') { $.ajax({ url:“searchSp.php”, 方法:“张贴”, 数据:{search:searchtext}, 成功:功能(数据) { $('#order_table').html(数据); } }); } 其他的 { $.ajax({ url:“filterSp.php”, 方法:“张贴”, 数据:{filter:sortdrpdwn}, 成功:功能(数据) { $('#order_table').html(数据); } }); } } });
filterSp.php这是当我使用过滤器下拉列表时调用的php文件,其中是用于星级评定的插件java脚本

  <?php  

        error_reporting(E_ALL & ~E_NOTICE);
        error_reporting(E_ERROR | E_PARSE);

        $connect = mysqli_connect("localhost", "root", "", "srdatabase");  

        if(isset($_POST['search_text']))
        {
            $search = mysqli_real_escape_string($connect, $_POST["search"]);

            $query = "
            SELECT * FROM speakers 
            WHERE speaker_fullname LIKE '%".$search."%'
            OR speaker_specialization1 LIKE '%".$search."%'
            OR speaker_specialization2 LIKE '%".$search."%'
            OR speaker_specialization3 LIKE '%".$search."%'
            OR speaker_specialization4 LIKE '%".$search."%'
            OR speaker_specialization5 LIKE '%".$search."%'
            ";  
        }

        else
        {
            $filter = mysqli_real_escape_string($connect, $_POST["filter"]);

            if($filter == "all")
            {
                $query = "SELECT * FROM speakers";  
            }

            else if($filter == "motivational")
            {   
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'motivational' OR speaker_specialization2 = 'motivational' OR speaker_specialization3 = 'motivational' ";  
            }

            else if($filter == "technology")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'technology' OR speaker_specialization2 = 'technology' OR speaker_specialization3 = 'technology' ";  
            }   

            else if($filter == "business")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'business' OR speaker_specialization2 = 'business' OR speaker_specialization3 = 'business' ";
            }

            else if($filter == "leadership")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'leadership' OR speaker_specialization2 = 'leadership' OR speaker_specialization3 = 'leadership' ";
            }

            else if($filter == "innovation")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'innovation' OR speaker_specialization2 = 'innovation' OR speaker_specialization3 = 'innovation' ";
            }

            else if($filter == "entertainment")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'entertainment' OR speaker_specialization2 = 'entertainment' OR speaker_specialization3 = 'entertainment' ";
            }

            else if($filter == "healthcare")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'healthcare' OR speaker_specialization2 = 'healthcare' OR speaker_specialization3 = 'healthcare' ";   
            }
        }   
            $result = mysqli_query($connect, $query);  


            if(mysqli_num_rows($result) > 0)   
            {  
                    while ($array = mysqli_fetch_array($result)) 
                    { 
                            $output .= '  
                                 <a href="speakerProfile.php?id='.$array["id"].'">
                                <div class="col-sm-6 col-md-4 wow fadeInDown">
                                    <div class="thumbnail"><img class="speakers-image" src="img/'.$array["speaker_image"].'" style="height:220px; min-width:100%;"/>
                                    <div class="caption" style="height:150px; min-width:100%" >
                                        <center>
                                        <h3 class="speakers-name">'.$array["speaker_fullname"].'</h5>
                                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization1"].'</p> 
                                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization2"].'</p>
                                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization3"].'</p>
                                        <br><br>
                                      //The div where the star rating will show
                                        <div class="rw-ui-container" data-urid='.$array["id"].'></div>
                                        </center>
                                    </div>
                                    </div>
                                </div>
                                </a>
                            ';  
                    }  
            }
            echo $output;  
         ?>
// Star rating javascript        
         <script type="text/javascript">(function(d, t, e, m){

            // Async Rating-Widget initialization.
            window.RW_Async_Init = function(){

                RW.init({
                    huid: "374760",
                    uid: "43310efaa801e10e1e02debca5f5b237",
                    source: "website",
                    options: {
                        "size": "medium",
                        "style": "oxygen",
                        "isDummy": false
                    } 
                });
                RW.render();
            };
                // Append Rating-Widget JavaScript library.
            var rw, s = d.getElementsByTagName(e)[0], id = "rw-js",
                l = d.location, ck = "Y" + t.getFullYear() + 
                "M" + t.getMonth() + "D" + t.getDate(), p = l.protocol,
                f = ((l.search.indexOf("DBG=") > -1) ? "" : ".min"),
                a = ("https:" == p ? "secure." + m + "js/" : "js." + m);
            if (d.getElementById(id)) return;              
            rw = d.createElement(e);
            rw.id = id; rw.async = true; rw.type = "text/javascript";
            rw.src = p + "//" + a + "external" + f + ".js?ck=" + ck;
            s.parentNode.insertBefore(rw, s);
            }(document, new Date(), "script", "rating-widget.com/"));
        </script>
<?php  

error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ERROR | E_PARSE);

$connect = mysqli_connect("localhost", "root", "", "srdatabase");   

    $search = mysqli_real_escape_string($connect, $_POST["search"]);

    $query = "
    SELECT * FROM speakers 
    WHERE speaker_fullname LIKE '%".$search."%'
    OR speaker_specialization1 LIKE '%".$search."%'
    OR speaker_specialization2 LIKE '%".$search."%'
    OR speaker_specialization3 LIKE '%".$search."%'
    ";  

    $result = mysqli_query($connect, $query);  


    if(mysqli_num_rows($result) > 0)   
    {  
        while ($array = mysqli_fetch_array($result)) 
        { 
                $output .= '  
                     <a href="speakerProfile.php?id='.$array["id"].'">
                    <div class="col-sm-6 col-md-4 wow fadeInDown">
                        <div class="thumbnail"><img class="speakers-image" src="img/'.$array["speaker_image"].'" style="height:220px; min-width:100%;"/>
                        <div class="caption" style="height:220px;>
                            <center>
                            <h3 class="speakers-name speaker-topics">'.$array["speaker_fullname"].'</h5>
                            <p class="speakers-name speaker-topics">'.$array["speaker_specialization1"].'</p> 
                            <p class="speakers-name speaker-topics">'.$array["speaker_specialization2"].'</p>
                            <p class="speakers-name speaker-topics">'.$array["speaker_specialization3"].'</p>
                            <br><br>

                            <div class="rw-ui-container" data-urid='.$array["id"].'></div>
                            </center>
                        </div>
                        </div>
                    </div>
                    </a>
                ';  
           }  
    }
    echo $output;  
 ?>


 <script type="text/javascript">(function(d, t, e, m){

    // Async Rating-Widget initialization.
    window.RW_Async_Init = function(){

        RW.init({
            huid: "374760",
            uid: "43310efaa801e10e1e02debca5f5b237",
            source: "website",
            options: {
                "size": "medium",
                "style": "oxygen",
                "isDummy": false
            } 
        });
        RW.render();
    };
        // Append Rating-Widget JavaScript library.
    var rw, s = d.getElementsByTagName(e)[0], id = "rw-js",
        l = d.location, ck = "Y" + t.getFullYear() + 
        "M" + t.getMonth() + "D" + t.getDate(), p = l.protocol,
        f = ((l.search.indexOf("DBG=") > -1) ? "" : ".min"),
        a = ("https:" == p ? "secure." + m + "js/" : "js." + m);
    if (d.getElementById(id)) return;              
    rw = d.createElement(e);
    rw.id = id; rw.async = true; rw.type = "text/javascript";
    rw.src = p + "//" + a + "external" + f + ".js?ck=" + ck;
    s.parentNode.insertBefore(rw, s);
    }(document, new Date(), "script", "rating-widget.com/"));</script>

//星级javascript
(功能(d、t、e、m){
//异步评级小部件初始化。
window.RW\u Async\u Init=函数(){
RW.init({
赫德:“374760”,
uid:“43310efaa801e10e1e02debca5f5b237”,
资料来源:“网站”,
选项:{
“大小”:“中等”,
“风格”:“氧气”,
“isDummy”:错误
} 
});
RW.render();
};
//附加评级小部件JavaScript库。
var rw,s=d.getElementsByTagName(e)[0],id=“rw js”,
l=d.location,ck=“Y”+t.getFullYear()
“M”+t.getMonth()+“D”+t.getDate(),p=l.protocol,
f=((l.search.indexOf(“DBG=”)>-1)?:“.min”),
a=(“https:==p?”安全“+m+”js/”:“js.”+m);
if(d.getElementById(id))返回;
rw=d.createElement(e);
rw.id=id;rw.async=true;rw.type=“text/javascript”;
rw.src=p+“/”+a+“外部”+f+”.js?ck=“+ck;
s、 parentNode.insertBefore(rw,s);
}(文档,新日期(),“脚本”,“rating widget.com/”);
这是当我使用搜索函数时调用的php文件,其中是用于星级评定的插件java脚本

  <?php  

        error_reporting(E_ALL & ~E_NOTICE);
        error_reporting(E_ERROR | E_PARSE);

        $connect = mysqli_connect("localhost", "root", "", "srdatabase");  

        if(isset($_POST['search_text']))
        {
            $search = mysqli_real_escape_string($connect, $_POST["search"]);

            $query = "
            SELECT * FROM speakers 
            WHERE speaker_fullname LIKE '%".$search."%'
            OR speaker_specialization1 LIKE '%".$search."%'
            OR speaker_specialization2 LIKE '%".$search."%'
            OR speaker_specialization3 LIKE '%".$search."%'
            OR speaker_specialization4 LIKE '%".$search."%'
            OR speaker_specialization5 LIKE '%".$search."%'
            ";  
        }

        else
        {
            $filter = mysqli_real_escape_string($connect, $_POST["filter"]);

            if($filter == "all")
            {
                $query = "SELECT * FROM speakers";  
            }

            else if($filter == "motivational")
            {   
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'motivational' OR speaker_specialization2 = 'motivational' OR speaker_specialization3 = 'motivational' ";  
            }

            else if($filter == "technology")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'technology' OR speaker_specialization2 = 'technology' OR speaker_specialization3 = 'technology' ";  
            }   

            else if($filter == "business")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'business' OR speaker_specialization2 = 'business' OR speaker_specialization3 = 'business' ";
            }

            else if($filter == "leadership")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'leadership' OR speaker_specialization2 = 'leadership' OR speaker_specialization3 = 'leadership' ";
            }

            else if($filter == "innovation")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'innovation' OR speaker_specialization2 = 'innovation' OR speaker_specialization3 = 'innovation' ";
            }

            else if($filter == "entertainment")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'entertainment' OR speaker_specialization2 = 'entertainment' OR speaker_specialization3 = 'entertainment' ";
            }

            else if($filter == "healthcare")
            {
                $query = "SELECT * FROM speakers WHERE speaker_specialization1 = 'healthcare' OR speaker_specialization2 = 'healthcare' OR speaker_specialization3 = 'healthcare' ";   
            }
        }   
            $result = mysqli_query($connect, $query);  


            if(mysqli_num_rows($result) > 0)   
            {  
                    while ($array = mysqli_fetch_array($result)) 
                    { 
                            $output .= '  
                                 <a href="speakerProfile.php?id='.$array["id"].'">
                                <div class="col-sm-6 col-md-4 wow fadeInDown">
                                    <div class="thumbnail"><img class="speakers-image" src="img/'.$array["speaker_image"].'" style="height:220px; min-width:100%;"/>
                                    <div class="caption" style="height:150px; min-width:100%" >
                                        <center>
                                        <h3 class="speakers-name">'.$array["speaker_fullname"].'</h5>
                                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization1"].'</p> 
                                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization2"].'</p>
                                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization3"].'</p>
                                        <br><br>
                                      //The div where the star rating will show
                                        <div class="rw-ui-container" data-urid='.$array["id"].'></div>
                                        </center>
                                    </div>
                                    </div>
                                </div>
                                </a>
                            ';  
                    }  
            }
            echo $output;  
         ?>
// Star rating javascript        
         <script type="text/javascript">(function(d, t, e, m){

            // Async Rating-Widget initialization.
            window.RW_Async_Init = function(){

                RW.init({
                    huid: "374760",
                    uid: "43310efaa801e10e1e02debca5f5b237",
                    source: "website",
                    options: {
                        "size": "medium",
                        "style": "oxygen",
                        "isDummy": false
                    } 
                });
                RW.render();
            };
                // Append Rating-Widget JavaScript library.
            var rw, s = d.getElementsByTagName(e)[0], id = "rw-js",
                l = d.location, ck = "Y" + t.getFullYear() + 
                "M" + t.getMonth() + "D" + t.getDate(), p = l.protocol,
                f = ((l.search.indexOf("DBG=") > -1) ? "" : ".min"),
                a = ("https:" == p ? "secure." + m + "js/" : "js." + m);
            if (d.getElementById(id)) return;              
            rw = d.createElement(e);
            rw.id = id; rw.async = true; rw.type = "text/javascript";
            rw.src = p + "//" + a + "external" + f + ".js?ck=" + ck;
            s.parentNode.insertBefore(rw, s);
            }(document, new Date(), "script", "rating-widget.com/"));
        </script>
<?php  

error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ERROR | E_PARSE);

$connect = mysqli_connect("localhost", "root", "", "srdatabase");   

    $search = mysqli_real_escape_string($connect, $_POST["search"]);

    $query = "
    SELECT * FROM speakers 
    WHERE speaker_fullname LIKE '%".$search."%'
    OR speaker_specialization1 LIKE '%".$search."%'
    OR speaker_specialization2 LIKE '%".$search."%'
    OR speaker_specialization3 LIKE '%".$search."%'
    ";  

    $result = mysqli_query($connect, $query);  


    if(mysqli_num_rows($result) > 0)   
    {  
        while ($array = mysqli_fetch_array($result)) 
        { 
                $output .= '  
                     <a href="speakerProfile.php?id='.$array["id"].'">
                    <div class="col-sm-6 col-md-4 wow fadeInDown">
                        <div class="thumbnail"><img class="speakers-image" src="img/'.$array["speaker_image"].'" style="height:220px; min-width:100%;"/>
                        <div class="caption" style="height:220px;>
                            <center>
                            <h3 class="speakers-name speaker-topics">'.$array["speaker_fullname"].'</h5>
                            <p class="speakers-name speaker-topics">'.$array["speaker_specialization1"].'</p> 
                            <p class="speakers-name speaker-topics">'.$array["speaker_specialization2"].'</p>
                            <p class="speakers-name speaker-topics">'.$array["speaker_specialization3"].'</p>
                            <br><br>

                            <div class="rw-ui-container" data-urid='.$array["id"].'></div>
                            </center>
                        </div>
                        </div>
                    </div>
                    </a>
                ';  
           }  
    }
    echo $output;  
 ?>


 <script type="text/javascript">(function(d, t, e, m){

    // Async Rating-Widget initialization.
    window.RW_Async_Init = function(){

        RW.init({
            huid: "374760",
            uid: "43310efaa801e10e1e02debca5f5b237",
            source: "website",
            options: {
                "size": "medium",
                "style": "oxygen",
                "isDummy": false
            } 
        });
        RW.render();
    };
        // Append Rating-Widget JavaScript library.
    var rw, s = d.getElementsByTagName(e)[0], id = "rw-js",
        l = d.location, ck = "Y" + t.getFullYear() + 
        "M" + t.getMonth() + "D" + t.getDate(), p = l.protocol,
        f = ((l.search.indexOf("DBG=") > -1) ? "" : ".min"),
        a = ("https:" == p ? "secure." + m + "js/" : "js." + m);
    if (d.getElementById(id)) return;              
    rw = d.createElement(e);
    rw.id = id; rw.async = true; rw.type = "text/javascript";
    rw.src = p + "//" + a + "external" + f + ".js?ck=" + ck;
    s.parentNode.insertBefore(rw, s);
    }(document, new Date(), "script", "rating-widget.com/"));</script>

(功能(d、t、e、m){
//异步评级小部件初始化。
window.RW\u Async\u Init=函数(){
RW.init({
赫德:“374760”,
uid:“43310efaa801e10e1e02debca5f5b237”,
资料来源:“网站”,
选项:{
“大小”:“中等”,
“风格”:“氧气”,
“isDummy”:错误
} 
});
RW.render();
};
//附加评级小部件JavaScript库。
var rw,s=d.getElementsByTagName(e)[0],id=“rw js”,
l=d.location,ck=“Y”+t.getFullYear()
“M”+t.getMonth()+“D”+t.getDate(),p=l.protocol,
f=((l.search.indexOf(“DBG=”)>-1)?:“.min”),
a=(“https:==p?”安全“+m+”js/”:“js.”+m);
if(d.getElementById(id))返回;
rw=d.createElement(e);
rw.id=id;rw.async=true;rw.type=“text/javascript”;
rw.src=p+“/”+a+“外部”+f+”.js?ck=“+ck;
s、 parentNode.insertBefore(rw,s);
}(文档,新日期(),“脚本”,“rating widget.com/”);

searchSp.php中,将高度从height:150px更改为height:220px

您没有将评级脚本传递给ajax响应

正如我在评论中所说,您可以使用sdk,如果是这样的话,就不需要您的searchSp.php所需的javascript

<?php  

error_reporting(E_ALL & ~E_NOTICE);
error_reporting(E_ERROR | E_PARSE);
    // Use API site scope.
define('RW_SDK__API_SCOPE', 'site');

// Modify the following definitions to your site details.
define('RW_SDK__SITE_ID',         '__YOUR_SITE_ID__');
define('RW_SDK__SITE_PUBLIC_KEY', '__YOUR_SITE_PUBLIC_KEY__');
define('RW_SDK__SITE_SECRET_KEY', '__YOUR_SITE_SECRET_KEY__');

// Include RatingWidget's SDK.
require dirname(__ROOT__) . '/ratingwidget.php';

// Init SDK with your site details (assumes that the SDK located in same folder of this example).
$rw_api = new \RatingWidget\Api\Sdk\RatingWidget(
    RW_SDK__API_SCOPE,
    RW_SDK__SITE_ID,
    RW_SDK__SITE_PUBLIC_KEY,
    RW_SDK__SITE_SECRET_KEY
);

$item_id = $array["id"]; // Replace that with your rating id.

// If you want the rating to work with Rich-Snippets,
// set the rating class to one of the following values:
//     product, page, blog-post, post, front-post, item
$rating_class = 'product';  
$connect = mysqli_connect("localhost", "root", "", "srdatabase");   

$search = mysqli_real_escape_string($connect, $_POST["search"]);

$query = "
SELECT * FROM speakers 
WHERE speaker_fullname LIKE '%".$search."%'
OR speaker_specialization1 LIKE '%".$search."%'
OR speaker_specialization2 LIKE '%".$search."%'
OR speaker_specialization3 LIKE '%".$search."%'
";  

$result = mysqli_query($connect, $query);  


if(mysqli_num_rows($result) > 0)   
{  
    while ($array = mysqli_fetch_array($result)) 
    { 
            $output .= '  
                 <a href="speakerProfile.php?id='.$array["id"].'">
                <div class="col-sm-6 col-md-4 wow fadeInDown">
                    <div class="thumbnail"><img class="speakers-image" src="img/'.$array["speaker_image"].'" style="height:220px; min-width:100%;"/>
                    <div class="caption" style="height:220px;>
                        <center>
                        <h3 class="speakers-name speaker-topics">'.$array["speaker_fullname"].'</h5>
                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization1"].'</p> 
                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization2"].'</p>
                        <p class="speakers-name speaker-topics">'.$array["speaker_specialization3"].'</p>
                        <br><br>
                         <div class="rw-ui-container rw-class-'. 
                           $rating_class .' rw-urid-'. $item_id.'">
                          </div>'.
                         $rw_api->EchoAggregateRating($item_id).'
                        </center>
                    </div>
                    </div>
                </div>
                </a>
            ';  
       }  
}
echo $output;  
?>

嗯,我不认为身高是原因。。但是谢谢你的建议。谢谢你的帮助,先生。但是我不知道为什么它不起作用,我遵照你的指示。首先,我用插件代码创建一个rating.js。并修改ajax脚本,但它不起作用。先生,请帮我修好它,上面写着未损坏的语法错误:意外标记)。其低于重新加载();您是否有意识地删除了插件代码中“window.RW_Async_Init=function(){”顶部的“(函数(d,t,e,m){”)呢