我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

使用PDO在数据库中存储html代码是否安全?

Right now I'm using a form to store html input, and then storing them in the database using PDO and mysql. The website then uses these inserted values to display parts of the site. Is that safe? Is there a better solution? What are the possible security implications?

Is that safe? Yes, so long as you're using something like HTML Purifier when you actually display it to the user.

Is it the best solution? Perhaps not. But hardly the worst.

近期文章

  • PHP网站:将<table>导出到Excel - 并删除<img>和<a>标签
  • 电子商务门户的数据库更新需要花时间使用php cron脚本
  • 需要帮助使用方法或案例声明更新PHP脚本
  • php mysql表单while语句填充下拉选中
  • Zend Lucene指数
  • 是否可以在HTML / PHP中为上传器自动选择文件?
  • Mongodb用php无法在哪里查询
  • 显示随机问题
  • AJAX PHP:使用AJAX的动态下拉列表
  • 提交按钮不会触发ajax函数[重复]
  • iframe src属性jquery执行两次
  • 在变化的环境中使用一个变量
  • Python脚本将空值返回给php
  • 如何使用ajax将数据从视图传递到控制器?
  • 根据输入调整一周中的几天
  • localhost上用于测试的不同会话
  • 如何使用plupload在laravel 4中获取更改的文件名?
  • PHP使用用户提交的数据将内容写入文件[重复]
  • 选择框默认值 - 仅当数据库中没有匹配项(PHP)时
  • Aptana php服务器调试模式在firefox中打开空白页面

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华