editnews.tpl文件是一个编辑新闻的页面,,,我想在网页上显示原来的值:
.tpl文件:...省略... <tr>
<td height="25" bgcolor="#FFFFFF"><div align="right">内容</div></td>
<td bgcolor="#FFFFFF"><label>
{assign var="rinfo" value="Bob"} {include_php file="fckeditor/fckeditor.php"}
{php}
$sBasePath ="fckeditor/";$oFCKeditor = new FCKeditor('info') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Config['AutoDetectLanguage'] = true ;
$oFCKeditor->Config['DefaultLanguage'] = 'en' ;$oFCKeditor->Value =$r["info"];//就是这里的值无法显示
$oFCKeditor->Height="200";
$oFCKeditor->Create() ;
{/php}
</label></td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><label>
<input type="submit" name="Submit" value="提交">...省略...
----------------------------
而PHP中是这样取得数据:
$sql="select * from articles where articleid='".$id."'";
$result=mysql_query($sql) or die(mysql_error());
$r=mysql_fetch_array($result);
但$r["info"]就是无值显示!唉,,,苦恼
.tpl文件:...省略... <tr>
<td height="25" bgcolor="#FFFFFF"><div align="right">内容</div></td>
<td bgcolor="#FFFFFF"><label>
{assign var="rinfo" value="Bob"} {include_php file="fckeditor/fckeditor.php"}
{php}
$sBasePath ="fckeditor/";$oFCKeditor = new FCKeditor('info') ;
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Config['AutoDetectLanguage'] = true ;
$oFCKeditor->Config['DefaultLanguage'] = 'en' ;$oFCKeditor->Value =$r["info"];//就是这里的值无法显示
$oFCKeditor->Height="200";
$oFCKeditor->Create() ;
{/php}
</label></td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><label>
<input type="submit" name="Submit" value="提交">...省略...
----------------------------
而PHP中是这样取得数据:
$sql="select * from articles where articleid='".$id."'";
$result=mysql_query($sql) or die(mysql_error());
$r=mysql_fetch_array($result);
但$r["info"]就是无值显示!唉,,,苦恼
解决方案 »
- php添加图片上传功能求教
- apache上设置程序不能跨网站引用和读取程序是哪里?
- 求一SQL查询语句
- PHP配置时添加了oci8.dll为什么还是连接不上数据库?
- 如何在页面中显示树形结构?
- 第一次接触php,完全没头绪,大家给看看
- 刚出道写个信息发布系统php 静态页面的
- 能否用Post方法提交label控件的innerHTML或innerText值?
- 请教一个utf-8页面的问题:在utf-8页面中使用header函数报错。请教。。
- php中怎么从验证用户的页面在验证好后直接前往其他页面?请大家指点!
- Discuz 6.0 注册部分修改3000外包
- 做自己的网站遇到一个问题,我想在服务器上做一个程序,将网页中用户输入的信息用email发送到指定信箱?
$rs['info']=$oFCKeditor -> CreateHtml();
$smarty -> assign('FCKeditor',$rs['ci_content']);然后在TPL文件中直接用 $FCKeditor就可以显示用了smarty怎么还要让PHP与HTML混写??楼主好好思考下..