-
PHP流程控制的替代语法例子
[PHP教程] 2022-07-22 12:55:49 182人阅读
了解过press/wordpress一类博客程序的模板的PHPer都会看到很多奇怪的PHP语法,比如: 对于一部分PHPer根本没见过这些是什么东西呢?难道是那些博客的开发者自己搞的仿PHP的模板语言? 非也,其实这些都是PHP的语法,...[详细]
-
PHP如何判定一个gif图片是否为动态图片
[PHP教程] 2022-07-22 12:55:08 178人阅读
例子1 gif动画是gif89格式的,发现文件开头是gif89。但是很多透明图片也是用的gif89格式, GOOGLE到的:可以检查文件中是否包含:chr(021).chr(0xff).chr(00b).NETSCAPE2.0 chr(021).chr(0xff) 是gif图片中扩展功能...[详细]
-
php 一句话删除目录下全部文件
[PHP教程] 2022-07-22 12:53:40 102人阅读
例子 代码如下 array_map(unlink,glob(aaa/*)); 就是aa目录下所有文件了,下面讲一下这三个函数 glob() 函数返回匹配指定模式的文件名或目录 unlink()函数删除文件 array_map() 函数返回用户自定义函数作用后的数组...[详细]
-
PHP遍历文件夹与文件类及处理类用法例子
[PHP教程] 2022-07-22 12:52:46 155人阅读
本文实例讲述了PHP遍历文件夹与文件类及处理类用法,非常具有实用价值。分享给大家供大家参考。具体方法如下: FindFile.class.php类文件用于遍历目录文件,具体代码如下: ?php /** 遍历文件夹及文件类 * Date: 201...[详细]
-
php中禁止直接从浏览器输入地址访问.PHP文件
[PHP教程] 2022-07-22 12:51:47 179人阅读
比如说我http://www.111cn.net /xx.php 这个文件我不想让别人直接从浏览器输入地址访问 但是如果从任何网站连接http://www.111cn.net /xx.php过来就可以访问 本机建立连接也无法访问跳转到另外的地址 1.在xx.php文件...[详细]
-
php验证session无效问题处理办法
[PHP教程] 2022-07-22 12:51:12 197人阅读
环境,我用的是apache+php环境了 如我的程序代码如下结果发现一直提示验证码必须由4位数字组成,我再打印输出session echo $_SESSION[ssioner];exit;一直为空了,于时我想到了php环境配置的一个session文件目录,现在...[详细]
-
在php中unserialize返回false的解决方法
[PHP教程] 2022-07-22 12:50:24 102人阅读
php 提供serialize(序列化) 与unserialize(反序列化)方法。使用serialize序列化后,再使用unserialize反序列化就可以获取原来的数据。 先来看看如下程序实例: 输出:但下面这个例子反序列化会返回false检查序列化后...[详细]
-
PHP中date与gmdate有何区别?
[PHP教程] 2022-07-22 12:49:14 115人阅读
修改PHP的默认时区对它们的影响 每个地区都有自己的本地时间,在网上以及无线电通信中,时间的转换问题就显得格外突出。整个地球分为二十四个时区,每个时区都有自己的本地时间。在国际无线电或网络通信场合,为了统...[详细]
-
PHP邮件发送类PHPMailer用法示例详解
[PHP教程] 2022-07-22 12:48:30 58人阅读
本文实例讲述了PHP邮件发送类PHPMailer用法,并详细讲述了其具体的操作步骤。分享给大家供大家参考。具体步骤如下: 1.在服务器安装 sendmail 2.启动 sendmail修改 php.ini 3.Function sendMail函数。...[详细]
-
PHPNOW安装Memcached扩展方法详情
[PHP教程] 2022-07-22 12:46:45 183人阅读
首先需要下载的2个文件:memcached.exe 和 php_memcache.dll ,这里需要说明的是版本不对照貌似会出问题。 下面提供下载,经测试可以与PHPNOW-1.5.6兼容。这里我压缩一下,提供直接下载。 安装步骤: 1.解压 memcach...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]