首页 > 解决方案 > Delete html files from path

问题描述

I'm trying to create a classified site from scratch. I was thinking for each ad that is published to create an html file. If I delete an ad from the database the html still remains. There is a way to bind the data from the mysql with the html to delete together (mysql info) + (html)?

标签: phphtmlmysql

解决方案


您还需要在数据库表中具有指向您的 html 文件的路径。当您删除带有广告的条目时,您也会触发文件删除。

不要忘记:当您编辑广告时,您还需要更新相应的 html 文件。

另一种方法是将 html 直接存储在表中,并使用不同的缓存解决方案来快速提供内容。


推荐阅读