-
基于PHP中自带的字符串操作函数合集
[PHP教程] 2021-02-19 21:07:09 120人阅读
1、查找字符位置函数: 2、提取子字符函数(双字节) 3、替换字符串 4、查询字符串长度 5、比较字符函数 int strcmp($str1,$str2):$str1>= 6、分割成数组函数 str_split($str,len):把$str按len长度进行分割返回数组s...[详细]
-
PHP批量删除jQuery操作
[PHP教程] 2021-02-18 23:32:56 198人阅读
效果图如下所述: —>—>—> —>—>—> 创建视图show.php exec('set names utf8'); $sql='select * from ***'; $info=$pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC);?> $v){ ?> " 批量删除 创建adminDel.php exec(...[详细]
-
php类自动装载、链式操作、魔术方法实现代码
[PHP教程] 2021-02-18 23:32:12 118人阅读
1、自动装载实例 目录下有3个文件:index.php load.php tests文件夹 tests文件夹里有 test1.php '; echo __FILE__.' '; }} index.php内容 load.php内容 2、php 链式操作 class Database{ function where($where){ re...[详细]
-
php curl上传、下载、https登陆实现代码
[PHP教程] 2021-02-18 23:31:22 115人阅读
1、curl下载 2、curl上传 curl_setopt($ch,CURLOPT_UPLOAD,CURLOPT_INFILE,$fp); curl_setopt($ch,CURLOPT_INFILESIZE,filesize($localfile)); $rtn = curl_exec($ch); fclose($fp); if(!curl_errno($ch)){ echo "up...[详细]
-
php魔法函数与魔法常量使用介绍
[PHP教程] 2021-02-18 23:30:51 119人阅读
php 魔术函数 1。__construct() 实例化对象时被调用, 当__construct和以类名为函数名的函数同时存在时,__construct将被调用,另一个不被调用。 2。__destruct() 当删除一个对象或对象操作终止时被调用。 3。__call...[详细]
-
PHP魔术方法之__call与__callStatic使用方法
[PHP教程] 2021-02-18 23:30:02 114人阅读
核心代码 } public function __call($method,$arg){ echo '你想调用我不存在的方法',$method,'方法 '; echo '还传了一个参数 '; echo print_r($arg),' '; } public static function __callStatic($method,$arg){ ech...[详细]
-
PHP 实现页面静态化的几种方法
[PHP教程] 2021-02-18 23:29:16 132人阅读
1、通过buffer来实现 需要用file_put_contents ob_get_clean()等内置函数 2、通过$_SERVER['PATH_INFO']来实现 ';print_r($_SERVER);preg_match('/^\/(\d+)\/(\d+)\.html/',$_SERVER['PATH_INFO'],$arr);print_r($ar...[详细]
-
Yii2.0多文件上传实例说明
[PHP教程] 2021-02-18 23:08:10 140人阅读
p style="text-align: center" span style="font-size: 24px; font-family: Simsun; white-space: normal; word-spacing: 0px; text-transform: none; float: none; font-weight: bold; color: rgb(0,0); font-style...[详细]
-
PHP读取CSV大文件导入数据库的实例
[PHP教程] 2021-02-18 23:07:11 58人阅读
PHP如何对CSV大文件进行读取并导入数据库? 对于数百万条数据量的CSV文件,文件大小可能达到数百M,如果简单读取的话很可能出现超时或者卡死的现象。 为了成功将CSV文件里的数据导入数据库,分批处理是非常必要的。 ...[详细]
-
php实现和c#一致的DES加密解密实例
[PHP教程] 2021-02-18 23:06:20 172人阅读
PHP实现和c#一致的DES加密解密,可以从网上搜到一大堆,但是测试后发现都没法用。以下正确代码是我经过苦苦才找到的。希望大家在系统整合时能用的上。 注意:key的长度为8位以内。 #region DESEnCode DES加密 public...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]