-
用PHP写的MD5加密函数
[PHP教程] 2022-03-03 15:03:14 107人阅读
以下为引用的内容: //PHP_md5(字符串) define(BITS_TO_A_BYTE,8); define(BYTES_TO_A_WORD,4); define(BITS_TO_A_WORD,32); $m_lOnBits=array(30); $m_l2Power=array(30); function LShift($lValue,$iShiftBits) { ...[详细]
-
用PHP程序实现删除目录的三种方法实例
[PHP教程] 2022-03-03 15:02:39 119人阅读
1。递规法: //没测试 以下为引用的内容: deleteDir($dir) { if (rmdir($dir)==false is_dir($dir)) { if ($dp = opendir($dir)) { while (($file=readdir($dp)) != false) { if (is_dir($file) $file!=. $file!=.....[详细]
-
用javascript php随机显示图片
[PHP教程] 2022-03-03 15:02:11 83人阅读
想必你会用javascript随机显示图片。但如果图片的资料(比如链接)是经常变化,或是由用户修改、增加的,怎么办?我这里有个办法。 把图片的资料(如名称、地址、链接等)放在一个TXT文件里(如有MYSQL更好,没有也罢)。H...[详细]
-
用PHP程序为自己网站打造一个搜索引擎
[PHP教程] 2022-03-03 15:01:48 195人阅读
一、设计搜索表单 在网站的根目录下建个search.htm,内容如下 以下为引用的内容: html head title搜索表单/title meta http-equiv=Content-Type content=text/html; charset=gb2312 /head body bgcolor=#FFFFFF tex...[详细]
-
PHP关于代码转换问题比较完善的解决办法
[PHP教程] 2022-03-03 15:01:21 89人阅读
最近在写bbs中,遇上代码转换问题。寻找了很久,才得到一个比较完善的解决办法,可以彻底还原发文者的原文。 以下贴出,供大家指正。 系统:linux php4 oracle8i 以下为引用的内容: ? //--标题,名字等字段入库处理(...[详细]
-
用PHP程序实现随机广告图片显示
[PHP教程] 2022-03-03 15:00:57 174人阅读
以下为引用的内容: ?php #########随机广告显示########## function myads(){ $dir=ads; #设置存放记录的目录 //$dir=ads; #设置存放记录的目录 $ads=$dir/ads.txt; #设置广告代码文件 $log =$dir/ads.log; #设置ip...[详细]
-
PHP实例 PHP生成带有雪花背景的网站验证码
[PHP教程] 2022-03-03 15:00:24 195人阅读
PHP生成带有雪花背景的网站验证码: 以下为引用的内容: ?session_start();? FORM METHOD=POST ACTION= input type=text name=number maxlength=4img src=YanZhengMa.php?act=init INPUT TYPE=submit name=sub /FORM...[详细]
-
PHP实例 精确到每一秒钟的在线人数显示代码
[PHP教程] 2022-03-03 14:55:02 105人阅读
以下为引用的内容: ?php session_start(); $dat_now1=date(H i s);//取时间 $p2=explode( , $dat_now1); $dat_number1=$p2[0]*3600 $p2[1]*60 $p2[2];//取秒 if($online_time)//上次刷新时间 {$dat_h=substr($onlin...[详细]
-
PHP编程中常用的三则方法
[PHP教程] 2022-03-01 16:10:56 140人阅读
1.配置PHP文件目录 作为服务器端解释执行的脚本语言,PHP程序放置在某个服务器可以访问的目录下,一般可以通过修改Apache的httpd.conj进行配置,例如我们在该文件中的一句: Alias /test/ d:brhpwebsitebrhp/ 那么在...[详细]
-
菜鸟学习 动态网页PHP基本学习笔记
[PHP教程] 2022-03-01 16:07:54 194人阅读
1、 PHP片段四种表示形式。 标准tags:?php ? short tags:? ? 需要在php.ini中设置short _open_tag=on,默认是on asp tags: % %需要在php.ini中设置asp_tags=on,默认是off script tags:script language=php/scri...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]