$block 没有被退回。问题似乎出现在 while 语句期间。我以前使用过这个脚本,只是略有不同,所以我知道这是相当小的东西。任何帮助将不胜感激,在此先感谢。
<?php
if (isset($_GET['filter_tag'])) {
$filter_tag = $_GET['filter_tag'];
}
if (@mysql_connect('xxxxxxxxx','xxxxxxxxxx','xxxxxxxxxx')) {
if (mysql_select_db('xxxxx')) {
$query = " SELECT blocks . CNO, blocks . CName, blocks . URL, images . Ipath FROM blocks LEFT JOIN images ON blocks . INO = images . INO WHERE CNO LIKE 'mysql_real_escape_string($filter_tag)' ";
$query_run = mysql_query($query);
} while ($query_row = mysql_fetch_assoc($query_run)) {
echo $block = '<li id="'.$query_row['CNO'].'" class="block" data-toggle="modal" data-target="#blocklModal" >
<a href="'.$query_row['URL'].'" target="_blank">
<img class="b" src="'.$query_row["Ipath"].'" alt="" data-controls-modal="block-modal" data-backdrop="static">
</a>
<p class="c-title">'.$query_row['Name'].'</p>
</li>';
}
}
?>