请问用什么方法将以下数据库mysql的内容放到tinymce编辑器中:
下面我给大家讲讲javascript函数:
3f1c4e4b6b16bbbd69b2ee476dc4f83a <br>function show() <br>{ <br>alert("hello world"); <br>} <br>2cacc6d41bbb37262a98f745aa00fbf0
结果如图:
直接用PHP的select出来的,没有用!不能显示JS代码那一段,如图:
而我不用select出来的话直接用JS,代码如下:
<script>window.onload=function(){ var text_id=document.getElementById("Article_Content"); //textarea的id var content='<P>下面我给大家讲讲javascript函数:</P><PRE class=js name="code"><script> <BR>function show() <BR>{ <BR>alert("hello world"); <BR>} <BR></script>
结果如图:
却能够达到效果,如图:
我不知道是什么原因导致这种情况的,firebug出来的内容发现,主要是3f1c4e4b6b16bbbd69b2ee476dc4f83a 和<script>的区别,请问怎么解决这个问题????想了好久,就是不知道,,,, <p> <br /> <h2>回复讨论(解决方案) <p class="sougouAnswer"> <script>改成3f1c4e4b6b16bbbd69b2ee476dc4f83a可行? <p class="sougouAnswer"> 直接在js里面改的话,是可以的,但是现在关键是我用select读取数据库出来的$filetext['body']然后转义就是不可以,所以想知道该怎么办 <p class="sougouAnswer"> <pre class='brush:php;toolbar:false;'>$new_content='<P>下面我给大家讲讲javascript函数:</P><PRE class=js name="code"><script> <BR>function show() <BR>{ <BR>alert("hello world"); <BR>} <BR></script></pre> <P> 结果如图:<BR><img src="/static/imghwm/default1.png" data-src="uploaded/010P0000240111S5344-1.jpg" class="lazy" title=tu1 alt=tu1 style="max-width:90%";echo preg_replace_callback('/<\/?script>/i', function($r){return htmlentities($r[0]);}, $new_content) ; <br /> <p class="sougouAnswer"> 测试是可以的啊 不知道你的代码是怎么写的? <p class="sougouAnswer"> 如果是直接用$new_content='<P>下面我给大家讲讲javascript函数:<PRE class=js name="code"><script> <BR>function show() <BR>{ <BR>alert("hello world"); <BR>} <BR></script>
结果如图:
的确是可以的,可是如果$new_content的内容是已经存放在数据库里面了,然后我用select将其读出$filetext['body'],然后再拿来用:

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Laravel's service container and service providers are fundamental to its architecture. This article explores service containers, details service provider creation, registration, and demonstrates practical usage with examples. We'll begin with an ove


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver CS6
Visual web development tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
