新浪编辑器使用方法

 

header('content-type:text/html;charset=utf-8;');
include_once('sinaeditor.class.php教程');
/*********************************************************************************/
//这里判断表单提交动作,然后赋值给$content;
if($_get['act']=='subok') die(htmlspecialchars($content=$_post['gently_editor']));
/*********************************************************************************/
$editor=new sinaeditor('gently_editor');
$editor->value='<img src="../logo.gif"><h2>新浪博客编辑器php图片上传版!</h2>';
$editor->basepath='.';
$editor->height=500;
$editor->width=650;
$editor->autosave=false;
?>
<div align="center">
<form name="form1" id="form1" method="post" action="index.php?act=subok">
<?php
 $editor->create();
?><br />
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</div>

<?
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
  <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;
 }
}
?>

编辑器下载地址
http://down.111cn.net/webedit/2010/0819/20307.html

时间: 2024-08-01 13:14:32

新浪编辑器使用方法的相关文章

新浪编辑器的调用

require_once('cls.small_editor.php'); $obj = new SmallEditor(); $obj -> setEditor($e_form_name,$e_form_value,$width,$height); <?php         /*===========================================================         = 版权协议:         =        GPL (The GNU G

新浪彩票中奖现金怎么提现?新浪彩票提现方法

1)我们在手机中打开[新浪彩票]之后我们再登录,登录成功之后你会看到有一个[提现]按钮我们点击它.    2)然后在要开的"提现"界面之后我们输要需要提款金额然后点击[提交]即可 友情提示,提现最小金额必须在10或以上哦,如果你几块钱就不要提现了吧哈哈.

新浪在线可视化编辑器PHP版

调用 <?php /**  * 新浪博客编辑器PHP版封装类调用方法  *  */ header(\'Content-Type:text/html;Charset=utf-8;\'); include_once(\'sinaEditor.class.php\'); extract($_POST); extract($_GET); unset($_POST,$_GET); $act==\'subok\' && die("提交的内容是:<br>".html

python实现批量下载新浪博客的方法

         本文实例讲述了python实现批量下载新浪博客的方法.分享给大家供大家参考.具体实现方法如下: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

新浪直播插件反复安装还不能看直播解决方法

  新浪直播插件反复安装还不能看直播解决方法: 首先打开管理 找到对应的服务.Livedeamon. 我这里是手动,我要改成自动. 然后右键启动服务,在刷新下网页就能看球了 这是一场比赛的截图

php调用新浪短链接API的方法_php技巧

本文实例讲述了php调用新浪短链接API的方法.分享给大家供大家参考.具体方法如下: 复制代码 代码如下: <?php //Sina App_Key define('SINA_APPKEY', '31641035'); function curlQuery($url) {  //设置附加HTTP头  $addHead = array(  "Content-type: application/json"  );  //初始化curl,当然,你也可以用fsockopen代替  $cu

jQuery获取访问者IP地址的方法(基于新浪API与QQ查询接口)_jquery

本文实例讲述了jQuery获取访问者IP地址的方法.分享给大家供大家参考,具体如下: <script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ //通过调用新浪IP地址库接口查询用户当前所在国家.省份.城市.运营商信息 $.g

Android编程实现获取新浪天气预报数据的方法_Android

本文实例讲述了Android编程实现获取新浪天气预报数据的方法.分享给大家供大家参考,具体如下: 新浪天气预报地址: http://php.weather.sina.com.cn/xml.php?city=武汉&password=DJOYnieT8234jlsK&day=0 其中,city后的城市可用java.net.URLEncoder.encode("武汉"," gb2312");也可以直接写"武汉",但不能用"wu

php在新浪云中使用imagick的方法

php在新浪云中使用imagick生成缩略图并上传到Storage的方法 <?php //缩略图     $tmpFile ='http://phpff.com/original.jpg' ;     list($width, $height) = getimagesize($tmpFile);         // resize if necessary     if ($width >= 550 && $height >= 550) {         $image