php参数数据过滤安全类
<?php class mysafe{ public $logname; public $isshwomsg; function __construct(){ set_error_handler('MyError',E_ALL); //----- } function MyError($errno, $errstr, $errfile, $errline){ echo "<b>Error number:</b> [$errno],error on line $errline in $errfile<br />"; exit; } function wlog($logs){ if(empty($logname)){ $this->logname=$_SERVER["DOCUMENT_ROOT"]."/log.htm"; } $Ts=fopen($this->logname,"a+"); fputs($Ts,$logs."\r\n"); fclose($Ts); } function showmsg($msg='',$flag=false){ $this->isshwomsg=empty($this->isshwomsg) ? false : true; if ($this->isshwomsg) { echo '<br />--------------------------------------<br />'; echo $msg; echo '<br />--------------------------------------<br />'; if ($flag) exit;
这是一个php参数数据过滤安全类,需要的朋友可以下载使用
免责声明
本站所有资源均由网友贡献或各大下载网站转载。请自行检查软件的完整性!本站所有资源仅供学习参考。请不要将它们用于商业目的。否则,一切后果由您负责!如有侵权,请联系我们删除。联系方式:admin@php.cn
相关文章

04 Nov 2024
使用 Servlet Filters 修改请求参数问题:Tomcat 上托管的现有 Web 应用程序中存在安全漏洞 (XSS)...

21 Dec 2024
在 PHP 中创建安全的 MySQL 准备语句强化 MySQL 查询以防止恶意输入对于维护数据完整性和...

30 Nov 2024
使用 PHP 通过 SSH 进行 MySQL 远程连接要通过 SSH 建立与远程 MySQL 数据库的安全连接,请考虑采用以下方法...

29 Nov 2024
在 PHP 中通过 SSH 连接到 MySQL 背景:用于数据库连接的 SSH 隧道通过 SSH 连接到远程数据库提供了安全的...


热工具

热门文章
Windows 11 KB5054979中的新功能以及如何解决更新问题
03 Apr 2025
故障排查
如何修复KB5055523无法在Windows 11中安装?
10 Apr 2025
故障排查
Inzoi:如何申请学校和大学
02 Apr 2025
手游攻略
如何修复KB5055518无法在Windows 10中安装?
10 Apr 2025
故障排查
在哪里可以找到Atomfall中的站点办公室钥匙
02 Apr 2025
手游攻略