最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php htmlspecialchars()函数
时间:2022-07-02 10:04:12 编辑:袖梨 来源:一聚教程网
由于使用Javascript (通常情况下)客户端的技术,和PHP (通常情况下)服务器端技术,自从HTTP是一种“无国籍”协议,两种语言不能直接共享变量。
然而,人们可能通过变量两者之间的关系。途径之一是完成这一创造Javascript代码用PHP ,并刷新浏览器本身,通过特定变量返回的PHP脚本。下面的例子恰恰说明如何做到这一点-它使P HP代码捕获屏幕的高度和宽度,这通常是唯一可能在客户端。htmlspecialchars()函数
echo "n";
?>
php url
echo ";
?>
if (isset($_GET['width']) AND isset($_GET['height'])) {
// output the geometry variables
echo "Screen width is: ". $_GET['width'] ."
n";
echo "Screen height is: ". $_GET['height'] ."
n";
} else {
// pass the geometry variables
// (preserve the original query string
// -- post variables will need to handled differently)
echo "n";
exit();
}
?>
相关文章
- 真三国无双起源寻找记忆任务攻略分享 10-23
- 中国式相亲电表倒转卡组玩法攻略分享 10-23
- 中国式相亲勇气提升方法攻略分享 10-23
- 中国式相亲三胞胎新娘委托攻略分享 10-23
- 中国式相亲垂钓有成支线任务攻略 10-23
- 中国式相亲没有狗的世界支线任务攻略 10-23