本人菜菜鸟---------------
下了位高手的sinaEditor的编辑器,但现在出现在一点问题:
请高手指点指点,我也感觉自己太笨了
我想让它打印在页面上,但我总是读不出来----请高手说说怎么才能读出来,谢谢了!!!!!!!!!!!!!!!!!
:sweat::sweat::sweat::sweat::sweat::sweat::sweat:
以下为原代码------
<?php
/**
* 新浪博客编辑器PHP版封装类调用方法
*
*/
header('Content-Type:text/html;Charset=utf-8;');
include_once('sinaEditor.class.php');
extract($_POST);
extract($_GET);
unset($_POST,$_GET);
echo $title;
echo $gently_editor;
//$act=='subok' &&
die("提交的内容是:<br>".htmlspecialchars($gently_editor));
$editor=new sinaEditor('gently_editor');
$editor->Value='<h2>这个是一个测试!</h2><br>'; //这个vlaue是默认值吗???? 怎么把value变成自己输入的内容呢!!!!!!!!!!!!
$editor->BasePath='.';
$editor->Height=500;
$editor->Width=700;
$editor->AutoSave=false; //是不是要改成true
?>
<form name="form1" id="form1" method="post" action="index.php?act=subok">
<?php
$editor->Create();
?>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
<?php
/*
* Title:新浪博客编辑器PHP版封装类
* coder:gently
* Date:2007年11月9日
* Power by ZendStudio.Net
*
http://www.zendstudio.net/
* 您可以任意使用和传播,但请保留本段信息!
*
*/
class sinaEditor{
var $BasePath;
var $Width;
var $Height;
var $eName;
var $Value;
var $AutoSave;
function sinaEditor($eName){
$this->eName=$eName;
$this->BasePath='.';
$this->AutoSave=false;
$this->Height=460;
$this->Width=630;
}
function __construct($eName){
$this->sinaEditor($eName);
}
function Create(){
$ReadCookie=$this->AutoSave?1:0;
print <<<eot
<input type="text" name="title">
<textarea name="{$this->eName}" id="{$this->eName}" style="display:none;">{$this->Value}</textarea>
<iframe src="{$this->BasePath}/Edit/editor.htm?id={$this->eName}&ReadCookie={$ReadCookie}" frameBorder="0" marginHeight="0" marginWidth="0" scrolling="No" width="{$this->Width}" height="{$this->Height}"></iframe>
eot;
}
}
?>