简体   繁体   English

使用PHP MYSQL存储新闻文章或带有图片的博客

[英]Use PHP MYSQL to store news article or blog with images

I am learning about PHP and MySQL. 我正在学习PHP和MySQL。 I want to store an article such as this one: Newspaper Article with Images 我想存储这样的文章: 带图像的报纸文章

There are two parts to my question: 我的问题分为两部分:

First : When I would be composing the article, what sort of tool(preferably free) I would use to allow for putting images and graphs in the article. 首先 :撰写文章时,我将使用哪种工具(最好是免费的)在文章中放置图像和图形。 I am talking about the editor or similar thing here. 我在这里谈论编辑器或类似的东西。 I am seeing something similar here also while I am typing in the editor, I can see the preview down below. 在编辑器中输入内容时,我也在这里看到类似的内容,下面可以看到预览。 What sort of output the editor would it give me ? 编辑器会给我什么样的输出? HTML ?? HTML ?? How does it handle the uploaded images etc. 它如何处理上传的图像等

Second : This part depends on the answer of the first one. 第二 :这部分取决于第一个答案。 It deals with storing the article in the database. 它处理将文章存储在数据库中。 If the editor provides html, then it can be stored directly. 如果编辑器提供html,则可以直接存储它。 But if not, then how is it done ? 但是,如果没有,那怎么办呢?

Thanks in advance. 提前致谢。

You can use Redactor WYSIWYG html editor for creating articles. 您可以使用Redactor所见即所得html编辑器来创建文章。 And this will generate html code which will be stored in database. 并且这将生成将存储在数据库中的html代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM