php - 当查询包含双引号并出现在超链接内时,PHP 不显示查询的值
问题描述
我正在向 mysql 发送一个简单的查询以获取两个字段并将它们回显到表中:
<?php
$sql = "SELECT `Data`, `Cerca` FROM `llengua-cerques` ORDER BY `llengua-cerques`.`Data` DESC LIMIT 10;" ; }
$result = mysqli_query($app_db, $sql);
while ($aRow = mysqli_fetch_array($result)) {
cerca = $aRow['Cerca'];
$cerca = stripslashes($cerca); ?>
<li><a href="/llengua/resultats.php?cerca=<?php echo $cerca; ?>"><strong><?php echo strftime( '%d/%m/%y', strtotime( $aRow['Data'] ) ); ?></strong><?php echo $cerca; } ?></a></li>
它工作正常,但是这段代码什么时候:
- 它包含一个双引号 (") AND
- 出现在链接中
它显示为空。
我解决不了...
解决方案
推荐阅读
- javascript - 如何禁用嵌入式 Flutter Web 应用的滚动操作?
- linux - 使用 CLI 恢复使用 clonezilla 保存的磁盘映像
- c# - 如何找到嵌套列表的最小元素并返回其兄弟姐妹及其父 ID
- reactjs - 如何使用 React 中的功能组件将状态传递给同一组件中的另一个状态
- sql - 移除 BigQuery STRING 字段中的重叠子字符串
- c++ - GTest PrintTo 使用模板重载
- r - 用 R 读取 .mat 日期
- xamarin - 来自 DependencyService 的 Xamarin 表单视图
- c++ - ROS move_base 节点正在生成 pre-Hydro 警告
- javascript - 如何在javascript中获取带有http会话的字符串?