php - 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)?
解决方案
您还需要在数据库表中具有指向您的 html 文件的路径。当您删除带有广告的条目时,您也会触发文件删除。
不要忘记:当您编辑广告时,您还需要更新相应的 html 文件。
另一种方法是将 html 直接存储在表中,并使用不同的缓存解决方案来快速提供内容。
推荐阅读
- python - 我从网上安装的 Python 模块的源代码
- mysql - 如何获取至少注册一次但最终状态未注册的学生列表?
- python - Seaborn columnwise violinplot
- c# - 构建一个简单的图书预订系统
- python - Selenium Select from dropdown element not found in heroku,但在本地找到
- react-native - React-Native FlatList 用大列表缓慢渲染一些项目
- c# - 执行 var = var + n 的快捷语法?
- c++ - 我在哪里可以找到关于我的 C++ 库的实现特定信息?
- python - 带有 Python 应用程序的运输解释器
- java - 根据传递的参数选择接口的实现