-
在PHP中运用随机数的三个步骤详细代码
[PHP教程] 2022-03-10 16:35:08 180人阅读
我想做一个随机的出现的网页,可是用rand()就是不行,听说要初始化随机数,可是怎么初始化,请不吝赐教,谢谢! //第一步:初始化种子 $seedarray =microtime(); $seedstr =split( ,$seedarray,5); $seed =$seedstr[0...[详细]
-
PHP实用 用PHP来完成图片的简单上传
[PHP教程] 2022-03-10 16:34:47 135人阅读
//文件上传。Linux apache php3/4测试通过。iis测试未通过,win apache php未测试 ?php if ($HTTP_POST_VARS[upload]==上传){ file://这里你可以加上检查文件名,格式,图片尺寸等功能, file://$picurl 本地系统的...[详细]
-
拿php odbc access数据库来操作函数
[PHP教程] 2022-03-10 16:33:50 154人阅读
前些天下载了adodb,想用adodb连access数据库,后来连是连上了,不过不能更新和插入记录,也不知道为什么到现在还没人给我回答那个苦恼的问题,后来就放弃了adodb,使用php自己的odbc,但是使用很不方便,就写下了下...[详细]
-
用PHP来完成页面GZIP的压缩输出教程
[PHP教程] 2022-03-10 16:33:26 115人阅读
GZIP(GNU-ZIP)是一种压缩技术。经过GZIP压缩后页面大小可以变为原来的30%甚至更...[详细]
-
PHP进阶技巧 php用流方法制作缩略图
[PHP教程] 2022-03-10 16:33:07 134人阅读
其中db_mysql.inc.php,config.php,function.php不是真正使用到的,关键是$filename 文件名,我是通过读取数据库中的图片名称 ?php include_once (inc/db_mysql.inc.php); include_once (inc/config.php); include_onc...[详细]
-
讲解用PHP实现Jmai组件和发送邮件三例
[PHP教程] 2022-03-10 16:32:49 126人阅读
代码一: % On error resume next Dim JMail, contentId Set JMail = Server.CreateObject(JMail.Message) JMail.Charset = gb2312 邮件字符集,默认为US-ASCII JMail.ISOEncodeHeaders = False 是否进行ISO编码,默...[详细]
-
PHP示例 上传多个图片并校验的代码
[PHP教程] 2022-03-10 16:32:08 166人阅读
单张的图片上传是不复杂的,这里涉及到多张图片上传和对图片格式的校验,保证上传的一定是图片,防止上传其他文件到服务器。 基本实现算法是使用数组的形式,把所有的图片提交个一个数组,对数组的元素进行一个个的...[详细]
-
PHP的语言层面的优化和代码优化技巧
[PHP教程] 2022-03-10 16:31:44 183人阅读
大规模的系统开发中,Cache无疑是至关重要的,php世界里,虽然不如java当中,有那么丰富的cache解决方案可以选择,但是,仍然有一些成熟的方案。 1、语言层面的优化:php具有不少引擎(engine)层面的api,通过这些api...[详细]
-
PHP实用手册 PHP常用正则表达式收集
[PHP教程] 2022-03-10 16:31:19 55人阅读
匹配中文字符的正则表达式: [u4e00-u9fa5] 评注:匹配中文还真是个头疼的事,有了这个表达式就好办了 匹配双字节字符(包括汉字在内):[^x00-xff] 评注:可以用来计算字符串的长度(一个双字节字符长度计2,ASCII字...[详细]
-
也用PHP来实现网页静态发布的两种方法
[PHP教程] 2022-03-10 16:31:01 194人阅读
如今很多网站都是静态发布的,PHP当然也可以方便的实现静态发布喽,具体的实现方法很多,下面我就说说我会的两种方法。 方法一:ob_get_contents() 这是一种很方便的方法,也是很常用的方法,实现原理是:首先打开缓...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]