请问我这里加的对吗?
(intval(base64_decode($_GET[id])))"); 就是附近。。谢谢。
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><?php
if($_GET[id]){
$sql_1=mysql_query("select * from $tbname_jihua where id =(intval(base64_decode($_GET[id])))");
}else{
$sql=mysql_query("select * from $tbname_jihua");
}
?>
$id = intval(base64_decode($_GET[id]));
$sql_1=mysql_query("select * from $tbname_jihua where id = {$id}");
// or
$sql_1=mysql_query("select * from $tbname_jihua where id = ". intval(base64_decode($_GET[id])) );
<br><font color="#e78608">------解决方案--------------------</font><br>intval<br>base64_decode<br>都是php函数,就和上面说的。在字符串里面是无法解析的。
<br><font color="#e78608">------解决方案--------------------</font><br>类似intval(base64_decode($_GET[id])) 这样的代码<br>单独写出来不好么,为什么要写在SQL里呢?因为省地方?<br><br>$id=intval(base64_decode($_GET[id]));<br>$sql_1=mysql_query("select * from $tbname_jihua where id ={$id}");<br><br>这样不清晰明了,而且你的问题也解决了... <div class="clear"></div>
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号