Simple installation, debugging, and calling of the hundreds of UEditor in the php project, and ueditor installation and debugging
For new users, only functions can be implemented, and other settings are completely default.
Preview:
1. First download it from the official website. Download the package and decompress it to the directory you want on the website. Put it in the root directory and insert the following HTML code in the Editor:
<! -- Load the editor container --> <! -- Add text to the following script as initialization content --> <script id = "container" name = "sb_remarks" type = "text/plain" style = "width: 600px; height: 200px; "> <p> <strong> <span style =" font-size: 14px; "> note: </span> </strong> </p> <br/> </p> </script> <! -- Configuration file --> <script type = "text/javascript" src = "./ueditor. config. js"> </script> <! -- Editor source code file --> <script type = "text/javascript" src = "./ueditor. all. js"> </script> <! -- Instantiate the editor --> <script type = "text/javascript"> var ue = UE. getEditor ('Container'); </script>
2. Call to pass the value
Add a sentence to the PHP file.
$sb_remarks=$_POST['sb_remarks'];
======================================
The following is my complete example code:
Index.html:
<! Doctype html>
Sb_add.php
<? Php $ con = mysql_connect ("localhost", "root", "110"); if (! $ Con) {die ('could not connect :'. mysql_error ();} mysql_query ("set names 'utf8'", $ con); mysql_select_db ("bzec", $ con ); $ sb_name = $ _ POST ['SB _ name']; $ sb_numandtype = $ _ POST ['SB _ numandtype']; $ sb_home = $ _ POST ['SB _ home']; $ sb_usedate = $ _ POST ['SB _ usedate']; $ sb_address = $ _ POST ['SB _ address']; // $ sb_updatetime = $ _ POST ['SB _ updatetime ']; $ sb_updatetime = date ("Y-m-d G: I: s"); $ sb_remarks = $ _ POST ['SB _ remarks ']; // $ nikename = Trim ($ nikename);/* if (! $ Nikename |! $ Email) // judge whether it is null {echo 'cannot be blank'; exit;} */$ SQL = "INSERT INTO shebeidangan (sb_name, sb_numandtype, sb_home, sb_usedate, sb_address, sb_updatetime, sb_remarks) VALUES ('$ sb_name', '$ sb_numandtype', '$ sb_home', '$ sb_usedate', '$ sb_address', '$ sb_updatetime ', '$ sb_remarks') "; if (! Mysql_query ($ SQL, $ con) {die ('error: '. mysql_error ();} echo "add OK"; mysql_close ($ con)?>
3. If you want to modify the default font size of the editor, find "font" in the UEditor directory and ueditor. all. js file to find the font to change the font size and font size.
The above is all the content of this article. I hope you will like it.