php中的ewebeditor表单调用
相关参数:<textarea name=content>
模板调用符:$
提交新表单的时候用如下代码,结果完全正常:
<form name="frm_HelpMessageAdd" id="frm_HelpMessageAdd" action="manage.php" method="POST" enctype="multipart/form-data">
<input name="content" type="hidden" id="shopProduct_Intro">
<iframe ID="eWebEditor1" src="other/editor/ewebeditor.php?id=shopProduct_Intro&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
<?php
$action = strtolower($_GET["action"]);
if($action == "do")
{
echo htmlspecialchars($_POST["shopProduct_Intro"]);
}
?>
打开此ID序号进行修改时出现iframe框中无任何内容,修改页面代码如下:
<?php
$value = $htmlspecialchars("content");
?>
<form name="frm_HelpMessageAdd" id="frm_HelpMessageAdd" action="manage.php" method="POST" enctype="multipart/form-data">
<input name="content" type="hidden" id="shopProduct_Intro" value="<?php echo "$value"; ?>">
<iframe ID="eWebEditor1" src="other/editor/ewebeditor.php?id=shopProduct_Intro&style=standard" frameborder="0" scrolling="no" width="500" HEIGHT="350"></iframe>
<?php
$action = strtolower($_GET["action"]);
if($action == "do")
{
echo htmlspecialchars($_POST["shopProduct_Intro"]);
}
?>
相关文档:
<?php
function checkMobile($str)
{
$pattern = "/^(13|15)\d{9}$/";
if (preg_match($pattern,$str))
{
Return true;
}
else
{
Return false;
}
}
$str = checkMobile("15800000001");
......
中文字符截取是一个十分有用的功能,在很多地方都会用到,比如提取定长标题,抽取标签等
由于各种字符集的存储方式的不一样,存在双字节(GBK)多字节(Unicode)的存储方式,这就导致了统一处理的困难。
国际标准UTF8字符编码中,存储中文字符要3个字节,即把php文件存储为UTF8编码格式可以得到
strlen(& ......
1.echo()是一个php语句,所以没有返回值,能打印简单的数据。
2.print()是一个函数,有返回值,能打印简单的数据。
3.print_r()是一个函数,能打印复杂的(mix)数据。
如:
<?
$value = print 'hello word<br>';
echo "the value is $value<br>";
$arr = array('name'=>'wangking','qq'=>'12345 ......
PHP trim() 函数
定义和用法
trim() 函数从字符串的两端删除空白字符和其他预定义字符。
语法
trim(str,charlist)
参数 1 str为待操作的字符串,参数 2 charlist 可选,指定了想要去除的特殊符号。
如果第二个参数没给值,预设会去除下列这些字元:
" " (ASCII 32 (0x20) ......