How to display videos in php and escape other codes

Source: Internet
Author: User
On the front-end page, I get a textarea tag to submit the content. Users can enter any content here. However, I want to perform special processing on the following three methods. what should I do? video: you can insert Youku's video code and read it from the database to display the video on the front-end. Image: enter an image... textareaTag to submit the content. you can enter any content here, but I want to perform special processing on the following three methods. what should I do?

  1. Video: you can insert Youku's video code and read it from the database to display the video on the front-end.

  2. Image: after entering the image address, the image can be displayed.

  3. Link: enter an address to display the link

Escape other symbols and codes. For example《script》alert('hello')《script》,

hello world

And so on.

When you re-edit the content, it displays the previously entered content, rather than the converted content.

The backend language is php. how can I write php? thank you!

Reply content:

I got one on the front-end page.textareaTag to submit the content. you can enter any content here, but I want to perform special processing on the following three methods. what should I do?

  1. Video: you can insert Youku's video code and read it from the database to display the video on the front-end.

  2. Image: after entering the image address, the image can be displayed.

  3. Link: enter an address to display the link

Escape other symbols and codes. For example《script》alert('hello')《script》,

hello world

And so on.

When you re-edit the content, it displays the previously entered content, rather than the converted content.

The backend language is php. how can I write php? thank you!

Low levels can only be thought of as regular expressions ···

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.