<?php/** * ShowMsg()返回信息定向函数 */function ShowMsg($_info,$_url) If $_url="" Then echo "<script type='text/javascript'>alert('$_info');history.back();</script>" Else If $_info="" Then header('Location:'.$_url); else echo "<script type='text/javascript'>alert('$_info');location.href='$_url';</script>"; End If End If?> 你这是php吗?
另外这个代码有xss 攻击漏洞。
这个不能直接在php中使用,不符合php语法
是不是11行的else 要大写的Else
最好把错误提示贴出来
你这是php吗?
另外这个代码有xss 攻击漏洞。
php代码不是这样写的吗?我是我根据我以前写asp改的,就是在dw下有警告不能用,所以问下
这个不能直接在php中使用,不符合php语法
能不能指出来啊,asp转php不知道是不是这样写的
是不是11行的else 要大写的Else
最好把错误提示贴出来
dw下就是在If $_url="" Then 这行 警告下
function ShowMsg($_info,$_url){ If ($_url=="" ){ echo "<script type='text/javascript'>alert('$_info');history.back();</script>"; }Else{ If ($_info=="") header('Location:'.$_url); else echo "<script type='text/javascript'>alert('$_info');location.href='$_url';</script>"; }}
function ShowMsg($_info,$_url){ If ($_url=="" ){ echo "<script type='text/javascript'>alert('$_info');history.back();</script>"; }Else{ If ($_info=="") header('Location:'.$_url); else echo "<script type='text/javascript'>alert('$_info');location.href='$_url';</script>"; }}function ShowMsg($_info,$_url){ if ($_url=="") { echo "<script type='text/javascript'>alert('$_info');history.back();</script>"; } else { If ($_info=="") { header('Location:'.$_url); } else { echo "<script type='text/javascript'>alert('$_info');location.href='$_url';</script>"; } }}其实没什么问题。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号