<?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>"; } }}对了,版主,楼上说这样写有xxs漏洞???怎么解?
采用 php+mysql 数据库方式运行的强大网上商店系统,执行效率高速度快,支持多语言,模板和代码分离,轻松创建属于自己的个性化用户界面 v3.5更新: 1).进一步静态化了活动商品. 2).提供了一些重要UFT-8转换文件 3).修复了除了网银在线支付其它支付显示错误的问题. 4).修改了LOGO广告管理,增加LOGO链接后主页LOGO路径错误的问题 5).修改了公告无法发布的问题,可能是打压
其实没什么问题。









