哪 位 能 帮 解 释 一 下 下 面 代 码 的 意 思。 这段代码不是很难,见议楼主对着手册看,能学到更多。但好像不是很完整,如fwrite($fileContent, "$pp");中的$pp不晓得在哪里。http://cn.php.net/manual/zh/index.php 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 代码写错了,$fileName="pp";应该是$fileName="data.txt"那data.txt是起什么作用呢 <? $fileName="pp"; if($action == "send") { $message = ereg_replace("\r\n", "<br>", $message); $message = ereg_replace(" ", " ", $message); $Today = date("F dS, Y"); $data = $name."\r\n".$Today."\r\n".$message."\r\n"; $fileContent = fopen("$fileName", "a"); if(Chop($name)!="" && Chop($message)!="") //删除字符串结尾的空白字符 { fwrite($fileContent, "$pp"); fclose($fileContent); } $action = ""; }?>这段代码能详细解释一下吗, Notice: Undefined offset: 23 in d:\usr\www\html\chp10\exa10-1.php on line 48Message: 运行后,出现这话,是什么意思 <? $fileName="pp"; if($action == "send") { $message = ereg_replace("\r\n", "<br>", $message); $message = ereg_replace(" ", " ", $message); //用<br>, 替换$message里的\r\n和空格 $Today = date("F dS, Y"); $data = $name."\r\n".$Today."\r\n".$message."\r\n"; $fileContent = fopen("$fileName", "a");//打开文件 if(Chop($name)!="" && Chop($message)!="") //删除字符串结尾的空白字符 { fwrite($fileContent, "$pp");//写入,至于这个$pp从何而来,就要看前面的代码了 fclose($fileContent);//关闭连接 } $action = "";//$action置空 }?>反正总觉得你这段程序怪怪的呵呵 下标越界$fileMessage[$i++]中$i超过了数组的范围将for($i=0; $fileMessage[$i]!="";) 改为for($i=0; $i<count($fileMessage);$i++) mysql utf-8 联合查询 问题 phpmailer 发邮件出错 SMTP Error: Could not authenticate 要如何預設上傳文件的路徑呢 PHP json_encode 中文乱码 关于数据入库,问了N次,希望这次能得到彻彻底底的肯定的回答!谢谢! 用fckeditor做编辑框时出的问题! [class]html table 类,结合实例 天气预报 关于文件上传的问题?急 请教一个参数传递的问题 简单的问题:关于记录信息! 求高手指点,linux下命令行模式运行php 请高手帮忙看一下代码
那data.txt是起什么作用呢
$fileName="pp";
if($action == "send")
{
$message = ereg_replace("\r\n", "<br>", $message);
$message = ereg_replace(" ", " ", $message);
$Today = date("F dS, Y");
$data = $name."\r\n".$Today."\r\n".$message."\r\n";
$fileContent = fopen("$fileName", "a");
if(Chop($name)!="" && Chop($message)!="")
//删除字符串结尾的空白字符
{
fwrite($fileContent, "$pp");
fclose($fileContent);
}
$action = "";
}
?>
这段代码能详细解释一下吗,
Message:
运行后,出现这话,是什么意思
$fileName="pp";
if($action == "send")
{
$message = ereg_replace("\r\n", "<br>", $message);
$message = ereg_replace(" ", " ", $message);
//用<br>, 替换$message里的\r\n和空格
$Today = date("F dS, Y");
$data = $name."\r\n".$Today."\r\n".$message."\r\n";
$fileContent = fopen("$fileName", "a");//打开文件
if(Chop($name)!="" && Chop($message)!="")
//删除字符串结尾的空白字符
{
fwrite($fileContent, "$pp");//写入,至于这个$pp从何而来,就要看前面的代码了
fclose($fileContent);//关闭连接
}
$action = "";//$action置空
}
?>反正总觉得你这段程序怪怪的呵呵
$fileMessage[$i++]中$i超过了数组的范围将
for($i=0; $fileMessage[$i]!="";)
改为
for($i=0; $i<count($fileMessage);$i++)