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"]就是无值显示!唉,,,苦恼
解决方案 »
- 帮忙解决一个新手问题
- 关于下面这个递归,为什么最后的$a值为0?不是1吗?
- php现在都是如何保护版权加密的?
- 怎樣排列以下层次模型
- CSS 问题 火狐
- 如何调用php中的数组
- 为什么我在MYSQL里面设置时间默认为NOW(),结果它显示的是00-00-00 00:00:00
- 浏览的路径问题???
- 在Win2kprofessional+IIS+SQLServer上安装PHP 4.0,谁试过?
- 请问在使用PHPLIB的时候,摸板文件template.inc从哪里来的?
- Discuz 6.0 注册部分修改3000外包
- 做自己的网站遇到一个问题,我想在服务器上做一个程序,将网页中用户输入的信息用email发送到指定信箱?
$rs['info']=$oFCKeditor -> CreateHtml();
$smarty -> assign('FCKeditor',$rs['ci_content']);然后在TPL文件中直接用 $FCKeditor就可以显示用了smarty怎么还要让PHP与HTML混写??楼主好好思考下..