今天碰见个奇怪事  装了个fckeditor后,打开一看,在文本输入框($oFCKeditor->Create();)内,光标只有下部分,输入文字后光标恢复正常,在这种情况下,我接收值试了试,正文的内容($oFCKeditor=new FCKeditor('FCKeditor1');)是接收不到的,var_dump打出来string(0),其他的OK,刷新一次后光标恢复正常,但是输入2个中文后用var_dump打出来却是string(13) "网站"
这个样子,我的页面都是utf-8的编码 ,看了看页面也没发现哪有多余的空格,求解?

解决方案 »

  1.   

    用firebug查看就知道了。好像有<p></p>标签。
      

  2.   

    textarea></textarea>是不是要紧挨着。哈哈
      

  3.   

    代码是这样子  是不是有问题?<?php 
    include '../editor/fckeditor.php';
    $oFCKeditor=new FCKeditor('FCKeditor1'); 
    $oFCKeditor->BasePath="../editor/";
    $oFCKeditor->Width='800';
    $oFCKeditor->Height='350';
    ?>
    <form action='./ok.php' method='post'>
    <table>
    <tr><td>标&nbsp;题td><td><input type='text' name='diarytitle' size='50'/></td></tr>
    <tr><td>类&nbsp;型</td><td>
    <select name="diarytype">
    <?php 
    require_once '../model/diaryService.php';
    $diaryService=new DiaryService();
    $res=$diaryService->getdiarytype();
    for ($i=0;$i<count($res);$i++){
    $row=$res[$i];
    echo "<option value='{$row['type']}'>{$row['type']}</option>";
    }
    ?>
            </select></td></tr>
    <tr><td>正&nbsp;文td><td><?php $oFCKeditor->Create(); ?></td></tr>
    <tr><td colspan="2"><input type="submit" value="&nbsp;发表&nbsp;"/></td></tr>
    </table>
    </form>