search
HomePHP LibrariesOther librariesPHP parameter filtering and data filtering classes
PHP parameter filtering and data filtering classes
<?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;
}

This is a PHP parameter and data filtering class. For data security, filtered data must be used before it can be used.

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

How Can I Efficiently Combine LIKE and IN Operators in SQL Server for Data Filtering?How Can I Efficiently Combine LIKE and IN Operators in SQL Server for Data Filtering?

16Jan2025

Utilizing "LIKE" and "IN" Together in SQL Server QueriesIn SQL Server, it is possible to utilize both the "LIKE" and "IN" operators in the same...

When to Use LIKE and When to Use = in MySQL: A Guide to Data FilteringWhen to Use LIKE and When to Use = in MySQL: A Guide to Data Filtering

01Nov2024

Understanding the Nuances of LIKE and = in MYSQLIn MySQL, the LIKE and = operators play crucial roles in filtering data. While both are used for...

Why does the AND operator (&) in pandas behave like the OR operator (|) when filtering data frames by multiple conditions?Why does the AND operator (&) in pandas behave like the OR operator (|) when filtering data frames by multiple conditions?

26Oct2024

pandas: Filtering Data Frame with Multiple ConditionsIn pandas, filtering data frames by values in multiple columns can be tricky. When using the...

How Do I Link Static Libraries That Depend on Other Static Libraries?How Do I Link Static Libraries That Depend on Other Static Libraries?

13Dec2024

Linking Static Libraries to Other Static Libraries: A Comprehensive ApproachStatic libraries provide a convenient mechanism to package reusable...

How to Silence TensorFlow\'s Debugging Output?How to Silence TensorFlow\'s Debugging Output?

28Oct2024

Suppression of Tensorflow Debugging OutputTensorflow prints extensive information about loaded libraries, found devices, and other debugging data...

How Does jQuery Simplify DOM Manipulation for Web Developers?How Does jQuery Simplify DOM Manipulation for Web Developers?

03Jan2025

Overflow: Hidden and Expansion of HeightjQuery distinguishes itself from other JavaScript libraries through its cross-platform compatibility and...

See all articles