寻ie6.0下读取注册表的方法。
用JS写的程序在IE5.0可以读取本地的注册表,但在IE6.0就不行了,...
作者 sunxiejun 发布于 2003-08-01 分类:php基础编程
我写的一个对文本文件操作的php 程序,在执行以后发现应该显示的表单的文本框和其中的一个提交按钮没有显示出来。但是我在浏览器中查看源文件,其中却有文本框和提交按钮的代码。并且我把这段源文件copy到dreamweaver中也可以显示出来。谁能帮我分析一下原因?谢谢了。
逛论坛交流:问一个没遇到的问题
把源代码帖出来。
$keyinput=trim("$keyinput");
if ($keyinput=="")
{
echo "请输入要填加的数据!";
include "form_radio.php";
include "form_rest.php";
exit;
}
$keyinput=""".$keyinput.""";
$fg=fopen($filename,"a+");
$contents=fread($fg,filesize($filename));
if (strstr($contents,$keyword)){ echo "您输入的keyword在文件中已经存在,请重新输入!";
include "form_radio.php";
include "form_rest.php";
exit;
}
$keyinput=$keyinput."
";错误就在此处,后来我该成$keyinput=$keyinput.chr(10);就可以了。有个朋友说unix和windows下的回车符不同。我的正好是用在unix下的,所以用了chr(10)就可以了。
echo "准备加入文件的keyinput=".$keyinput;
fputs($fg,$keyinput);
include "form_radio.php";
include "form_rest.php";
一定是你提交的内容中包含了标签了
所以有问题了
你在textarea中显示内容的时候要加上htmlspecialchars
htmlspecialchars能起到什么作用?一般都在什么时候用到?
4 条回复
回复