Problems in application of FCK in thinkphp

Source: Internet
Author: User
Application of FCK problem in thinkphp
FCK
Vendor ("Fckeditor.fckeditor");
$editor = new FCKeditor ();
$editor->width = ' 100% ';
$editor->height = ' 400 ';
$this->value = $_post[' content '];
$editor->instancename = ' content ';
$fckHtml = $editor->createhtml ();
$this->assign (' fckhtml ', $fckHtml);

The above code in the Add method uses no errors, and in the Edit method use hint: illegal operation thinkphp, what problem? Please expert advice!

------Solution--------------------
No indication of illegal operation?

PHP code
public function index () {...//other code vendor (" Fckeditor.fckeditor ");//contains the FCKeditor class library, TP introduces the third-party class library system method, its path is relative to the vendor directory.   $editor = new FCKeditor (); Instantiate the FCKeditor object $editor->width= ' 980′;//set the width that the editor actually needs. If this item is omitted, the default width is used. $editor->height= ' 400′;//sets the height that the editor actually needs. If this item is omitted, the default height is used. $this->value= ";//Set the editor initial value. It can also be a set value when modifying data. can be placed empty. $editor->instancename= ' comment ';//the ID and name of the input tag in the form where the editor is located, the ID of the  tag and name. Leave here//set to comment. It is not to be saved here, but also to remain unique. Once the form is uploaded to the server handler, it can be read by $_post[' comment '. $html = $editor->createhtml ();//Create an online editor HTML code string and assign a value to the string variable $html. $this->assign (' HTML ', $html);//Will $ The value of the HTML is assigned to the template variable $html. The template can be referenced directly by {$html}. ...//other code, including output templates. } 
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.