Home php教程 php手册 fck图片不能显示问题

fck图片不能显示问题

May 25, 2016 pm 04:53 PM
Do not show

我们来看看一个关于如何让fck能正常显示我们上传的图片吧。

<div id="wrapper"> 
<form name="form1" action="<?php echo $_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/"; //设置FCK的路径
$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>
Copy after login

路径不对,注意你的源代码:

<img  src="/static/imghw/default1.png"  data-src="/fck/upload/image/20090406214620132.jpg"  class="lazy"   / alt="fck图片不能显示问题 " >
Copy after login

再看你的调用fck地址为:fckeditor/fckeditor.php

说明你的预览页面和fck不在同级。再说,FCK默认上传图片源代码里都应该是完整URL。

你的FCK似乎改动过吧,配置一下你的fck就OK了。


本文链接:

收藏随意^^请保留教程地址.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)