我们来看看一个关于如何让fck能正常显示我们上传的图片吧。
- <div id="wrapper">
- <form name="form1" action="<?=$_SERVER["PHP_SELF"]?>" method="post">
- 标题:<input type="text" size="20" name="title" /><br />
- <?php
- include "fckeditor/fckeditor.php";
- $ofckeditor = new FCKeditor("fckeditor1");
- $ofckeditor->BasePath = "./fckeditor/";
- $ofckeditor->ToolbarSet = "Default";
- $ofckeditor->Width="700px";
- $ofckeditor->Height = "300px";
- $ofckeditor->Create();
- ?>
- <br />
- <input type="submit" name="submit" value="提交" />
- </form>
- <br />
- </div>
- <div>
- <?php
- echo $_POST["fckeditor1"];
- ?>
- </div>
路径不对,注意你的源代码:
- <img src="/fck/upload/image/20090406214620132.jpg" />
再看你的调用fck地址为:fckeditor/fckeditor.php
说明你的预览页面和fck不在同级。再说,FCK默认上传图片源代码里都应该是完整URL。
你的FCK似乎改动过吧,配置一下你的fck就OK了。