Javascript-the storage of personal blog posts. The ">" error exists in the article.

Source: Internet
Author: User
I wrote my own blog system, and everything was coded by myself. Now I want to save my own small articles to the database, and I plan to fix it in js + php + mysql, I don't know how to save articles. My idea is to directly use innHTML to get all the labels and text, and then use...

I wrote my own blog system, and everything was coded by myself. Now I want to save my own small articles to the database, and I plan to fix it in js + php + mysql, I don't know how to save articles. My idea is to directly use innHTML to get all the labels and texts, call php via ajax, and store them in mysql. You can call them directly during the call, I don't know if this is appropriate... I hope you can give me some suggestions.
Current problems: There is a ">" in my article. When I upload the article to php and return it back, I find it in the original article ">" There is nothing behind it. It feels like a php problem, php Code such:

Baidu has a lot of resources, but does not know what keywords to search. Before that, I came into contact with entities and things. How can I do this? Please give me some advice or have some suggestions on Article storage. Thank you!

Reply content:

I wrote my own blog system, and everything was coded by myself. Now I want to save my own small articles to the database, and I plan to fix it in js + php + mysql, I don't know how to save articles. My idea is to directly use innHTML to get all the labels and texts, call php via ajax, and store them in mysql. You can call them directly during the call, I don't know if this is appropriate... I hope you can give me some suggestions.
Current problems: There is a ">" in my article. When I upload the article to php and return it back, I find it in the original article ">" There is nothing behind it. It feels like a php problem, php Code such:

Baidu has a lot of resources, but does not know what keywords to search. Before that, I came into contact with entities and things. How can I do this? Please give me some advice or have some suggestions on Article storage. Thank you!

Http://tool.oschina.net/commons? Type = 2

Available>To replace your>

The html content is escaped and then stored for query.

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.