代码透露给用户! [英] Code revealed to user!

查看:97
本文介绍了代码透露给用户!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在收集用户的信息。


在一个方框中,他们可以输入一个名称,因为这可以预先存在

值从一个MySql数据库我读了一个值并在框中提示它

。用户可以接受这个名字或者输入他们自己的名字。


但是,尽管我测试了我无法重新创建一个错误,但是有些用户会体验到b
。似乎有些浏览器向用户透露我的php源代码

,或者至少输入源代码为

值。


有问题的代码行是..


< td class =" scfboxtext"宽度= QUOT; 700" colspan =" 2">

< input name =" acceptnmn"类型= QUOT;文本"类= QUOT; scfmfrm_inp" id =" acceptnmn"

value ="<?= $ acceptnmn?>"大小= QUOT; 80 QUOT; maxlength =" 100">

< / td>


从mysql数据库中读取值$ acceptnmn并显示,

null值显示空值,输入的任何名称都正确显示




在大约20%的情况下,用户决定不在这个

框中输入一个值。通常(每次测试时)都会在

mysql数据库中输入一个空白值。但是在某些没有输入名字的情况下

我很想看到mysql数据库中的以下值...


<?= $ acceptnmn?>


确切地说,没有别的,没有更少。


当用户重新使用此条目时,值


<?= $ acceptnmn?>


.....现在被建议作为一个值,显示超出我想透露的数量

给用户。


(即在这些情况下代码<?= $ acceptnmn?实际读入<?=

$ acceptnmn?作为值。


因此浏览器显示<?= $ acceptnmn?作为指定值

到$ acceptnmn


我一直认为浏览器不会将此代码显示给

用户。这只发生在一些可能是因为firefox或

别的东西是读错的代码。


任何帮助非常感谢


Garry Jones

瑞典

解决方案

acceptnmn?>"大小= QUOT; 80 QUOT; maxlength =" 100">

< / td>


读取值

acceptnmn从一个mysql数据库显示,一个

null值显示一个空值,输入的任何名字都正确显示




在大约20%的情况下,用户决定不在此

框中输入值。通常(每次测试时)都会在

mysql数据库中输入一个空白值。但是在某些没有输入名字的情况下

我很想看到mysql数据库中的以下值...


<?=


acceptnmn?>


确切地说,没有别的,没什么。


当用户然后重复使用此条目的值


<?=


I am collecting information from users.

In one box they can enter a name, as this can have a pre existing
value read in from a MySql database I read in a value and suggest it
in the box. The user can accept this name or enter their own.

However, as much as I test I can not recreate an error some users are
experiencing. It seems some browsers are revealing my php source code
to the user or at the very least entering the source code as the
value.

The offending row of code is..

<td class="scfboxtext" width="700" colspan="2">
<input name="acceptnmn" type="text" class="scfmfrm_inp" id="acceptnmn"
value="<?= $acceptnmn ?>" size="80" maxlength="100">
</td>

The value $acceptnmn is read in from a mysql database and displayed, a
null value displays a null value and any name entered is displayed
correctly.

In about 20% of cases the users decides not to enter a value in this
box. Usually (and everytime I test) a blank value is entered into the
mysql database. However in some of the cases where no name is entered
I am astonshised to see the following value in the mysql database...

<?= $acceptnmn ?>

Exactly that, nothing else, nothing less.

When the user then reuses this entry form the value

<?= $acceptnmn ?>

..... is now suggested as a value, revealing more than I want to reveal
to the user.

(ie in these cases the code <?= $acceptnmn ?actually reads in <?=
$acceptnmn ?as the value.

The browser is thus displaying <?= $acceptnmn ?as the assigned value
to $acceptnmn

I have always thought that browsers will not show this code to the
user. That is only happening on some may be because firefox or
something else is mis reading the code.

Any help greatly appreciated

Garry Jones
Sweden

解决方案

acceptnmn ?>" size="80" maxlength="100">
</td>

The value


acceptnmn is read in from a mysql database and displayed, a
null value displays a null value and any name entered is displayed
correctly.

In about 20% of cases the users decides not to enter a value in this
box. Usually (and everytime I test) a blank value is entered into the
mysql database. However in some of the cases where no name is entered
I am astonshised to see the following value in the mysql database...

<?=


acceptnmn ?>

Exactly that, nothing else, nothing less.

When the user then reuses this entry form the value

<?=


这篇关于代码透露给用户!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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