<?
if($sub)
{
$fp=   fopen("news1.php","a"); 
     fwrite($fp,$title.$belong.$comment); 
}
?>
<html> 
<head> 
<title> control </title> 
</head> 
<body> 
<form   id="back"> 
<div   align=center> 
title<input   type=text   name=title   id=title   maxlength=30   > 
belong <select   name=belong   id=belong> 
<option> overseas 
<option   selected> internal         
</select> 
<br> 
</div> 
<br> <br> 
body <br> 
<textarea   wrap=head   name=comment   id=comment   rows=20   cols=100>   </textarea> <P> 
<input   type=submit   name="sub" value=submit > <input   type=reset   value=reset> 
</form> 
</body> 
</html>

解决方案 »

  1.   

    <?
    if($sub)
    {
    $fp=   fopen("$title.php","a"); 
         fwrite($fp,$title.$belong.$comment); 
    }
    ?>
    <html> 
    <head> 
    <title> control </title> 
    </head> 
    <body> 
    <form   id="back"> 
    <div   align=center> 
    title<input   type=text   name=title   id=title   maxlength=30   > 
    belong <select   name=belong   id=belong> 
    <option> overseas 
    <option   selected> internal         
    </select> 
    <br> 
    </div> 
    <br> <br> 
    body <br> 
    <textarea   wrap=head   name=comment   id=comment   rows=20   cols=100>   </textarea> <P> 
    <input   type=submit   name="sub" value=submit > <input   type=reset   value=reset> 
    </form> 
    </body> 
    </html>
      

  2.   

    我在程序中用到了ewebeditor,虽然在网页中能打开这个编辑器,但在编辑器上面写着一排蓝底黑字
    Notice: Undefined index: fullscreen in C:\Documents and Settings\Administrator\Zend\workspaces\DefaultWorkspace\news\eWebEditor\ewebeditor.php on line 149
    这是什么原因啊,我在编辑器里不能写字,编辑器下面不见边框,不美观
      

  3.   

    $getphp($name,$commment)
    onclick="submit1($title,$belong,$comment);"
    你想干什么呢???
      

  4.   

    这可能是俺一厢情愿的想把输入的内容,等按了提交后,能得到一个PHP文件,
      

  5.   

    最好不要使用這種方法,這種"偷懶"的方式是不被PHP鼓勵的。獲得變量用  $_POST 或 $_GET還有 onclick="submit1($title,$belong,$comment);" 都出來了,你以為是JavaScript呀
    <?php
    if($_GET){
       file_put_contents('news1.php',$_GET['title'],$_GET['belong'],$_GET['comment']);
    }
    ?>
      

  6.   

    最直接的一个原因,你用客户端事件(onclick)来调用服务器端的函数(submit1($title,$belong,$comment))。
    this is impossble mission!