PHP在页面和安全性之间传递变量 [英] PHP Passing Variables Between Pages and Security

查看:38
本文介绍了PHP在页面和安全性之间传递变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在页面之间传递会话和隐藏变量。更不用说

发布价值了。


我很少担心有足够知识的人可以哄骗这些价值操纵程序。


这是一个有效的问题吗?我想我可以查看提交页面

围绕以下代码设置一些内容...


$ base_name = basename($ _ SERVER [''PHP_SELF'']);


这是一个不错的选择?还有更好的方法吗?


tia ...


ps - 在php.general发布这个,并且在2天后没有o / oa回复,

意识到可能不是发布它的最佳位置。

i''m passing session and hidden variables between pages. not to mention
post values.

i''m a little concerned that someone with sufficient knowledge could
spoof these vlaues and manipulate the program.

is this a valid concern? i''m thinking i can check the submitting page
setting up something around the following the following code...

$base_name = basename($_SERVER[''PHP_SELF'']);

is this a good bet? is there a better way?

tia...

ps - posted this on php.general and, after 2 days w/o a response,
realized that probably wasn''t the best place to post it.

推荐答案

base_name = basename(
base_name = basename(


_SERVER [''PHP_SELF'']);


这是一个不错的选择?还有更好的方法吗?


tia ...


ps - 在php.general发布这个,并且在2天后没有o / oa回复,

意识到可能不是发布它的最佳位置。

_SERVER[''PHP_SELF'']);

is this a good bet? is there a better way?

tia...

ps - posted this on php.general and, after 2 days w/o a response,
realized that probably wasn''t the best place to post it.


Skeets写道:

Skeets wrote:

这是一个不错的选择?有更好的方法吗?

tia ...
is this a good bet? is there a better way?

tia...




会话?但至少,如果有人使用选项卡式浏览器,

提交一个带有表单的id,并检查它与任何脚本处理

表单,以确保有多个选项卡同一网站不会导致数据

corrumption。


-
http://www.petezilla.co.uk


这篇关于PHP在页面和安全性之间传递变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆