php 7 openssl_decrypt() 代替 mcrypt_module_open() 方法
openssl_decrypt() 方法是用于对称加密的替代 mcrypt_module_open() 方法的一种更新方法,它使用 OpenSSL 库来提供更安全和更强大的加密功能。它的安全级别比 mcrypt_
2023-07-01 08:20
147 
PHP 判断是否为 AJAX 请求
可以使用 PHP 的 $_SERVER[HTTP_X_REQUESTED_WITH] 全局变量来判断: ```php if (!empty($_SERVER[HTTP_X_REQUESTED_WITH]) &&
2023-07-02 08:21
192 
PHP保留两位小数的几种方法
1. 使用 number_format() 函数: ``` echo number_format(1.2, 2); // 输出 1.20 ``` 2. 使用 sprintf() 函数: ``` echo s
2023-07-02 08:21
148 
php通过SSH通道来访问MySQL
可以使用第三方库来实现,例如PHPSECLIB: 1. 安装PHPSECLIB库: $ sudo apt-get install libssh2-php 2. 连接到SSH服务器: $conn = new
2023-07-02 08:21
148 
PHP 获取文件扩展名(后缀名)的方法
1. 使用pathinfo()函数: ``` $file_name = example.txt; $file_ext = pathinfo($file_name, PATHINFO_EXTENSION); ec
2023-07-02 08:21
143 
php中mysql手动提交事务和在for循环里进行事务控制及声明式事务的使用
1. mysql手动提交事务: 在MySQL中,使用commit语句可以手动提交事务,其语法如下: commit; 2.在for循环里进行事务控制 在for循环中使用事务,可以使用begin和commit
2023-07-02 08:22
149 
47001 data format error hint 解析 JSON/XML 内容错误
The error message 47001 Data Format Error typically indicates that an error occurred while attempting to p
2023-07-02 08:22
142 
str_replace替换多个关键字
str_replace(array(str1,str2),replace_str,subject);
2023-07-02 08:22
136 
T:0.014118s,M:195.16 KB
返回顶部 留言