-
PHP生成静态页面的办法
[PHP教程] 2022-01-15 14:19:27 157人阅读
在PHP网站开发中为了网站推广和SEO等需要,需要对网站进行全站或局部静态化处理,PHP生成静态HTML页面有多种方法,比如利用PHP模板、缓存等实现页面静态化,今天就以PHP实例教程形式讨论PHP生成静态页面的方法。页面...[详细]
-
php生成utf-8编码的xml办法
[PHP教程] 2022-01-15 14:19:02 103人阅读
前段时间在试用php本地测试的时候用的gbk的,默认的还可以用,可是这次换了utf-8编码的了,纠结呀。。 生成的xml读不出来了。... 其实用php生成UTF-8的文件没有什么特别的,只要把我们执行的那个PHP文件改成UTF-8编...[详细]
-
php与mysql guid的用法
[PHP教程] 2022-01-15 14:18:39 134人阅读
GUID: 即Globally Unique Identifier(全球唯一标识符) 也称作 UUID(Universally Unique IDentifier) 。 GUID是一个通过特定算法产生的二进制长度为128位的数字标识符,用于指示产品的唯一性。GUID 主要用于在拥有...[详细]
-
PHP中SESSION过期设定
[PHP教程] 2022-01-15 14:18:18 86人阅读
因为项目需要,要将PHP中SESSION保存部分数据,不过总有个过期不能处理,这儿介绍一下session的过期设置,如果设置了session过期无效,请看下后面的解决办法: 在PHP中,设置php.ini,找到session.gc_maxlifetime = 144...[详细]
-
PHP获取星期的方法和代码
[PHP教程] 2022-01-15 14:17:53 108人阅读
PHP星期几获取代码: 1 date(l); 2 //data就可以获取英文的星期比如Sunday 3 date(w); 4 //这个可以获取数字星期比如123,注意0是星期日 获取中文星期几: 1 $weekarray=array(日,一,二,三,四,五,六); 2 //先定义一...[详细]
-
php指定网址跳转代码示例
[PHP教程] 2022-01-15 14:17:23 100人阅读
php网址跳转代码实例: ? $s = $_SERVER[QUERY_STRING]; if ($s == http://www.baidu.com); { $s = http://www.qq.com; } if ($s == http://www.hao123.com); { $s = https://www.mycodes.net; } header(Location:.$...[详细]
-
PHP采集代码示例
[PHP教程] 2022-01-15 14:16:49 144人阅读
PHP采集代码实例,支持正则表达式设置从开始到结束区域,代码如下: ?php function preg_substr($start, $end, $str) // 正则截取函数 { $temp = preg_split($start, $str); $content = preg_split($end, $temp[1]);...[详细]
-
php程序员入门必知
[PHP教程] 2022-01-15 14:13:43 200人阅读
php程序员入门必读: 1.概要:学习任何语言都需要多看、多想、多写、多问!写编程是一种熟能生巧的东西!学习PHP也一样,因为知识就那么多,你看多了就会觉得怎么都一样。 程序员就是炒冷饭的,一遍又一遍。代码多敲...[详细]
-
php分页不用get用post代码示例
[PHP教程] 2022-01-15 14:05:30 128人阅读
a href=?=$_SERVER[PHP_SELF];??page=11/a a href=?=$_SERVER[PHP_SELF];??page=22/a .... form id=myform method=post name=myform action=?=$_SERVER[PHP_SELF];? input type=hidden name=page id=page value= / /...[详细]
-
PHP执行linux系统指令
[PHP教程] 2022-01-15 14:04:59 129人阅读
首先先要给大家介绍PHP执行linux系统命令的几个基本函数。我曾经很长一段时间都分不清下面几个函数的具体用法区别。 system函数 说明:执行外部程序并显示输出资料。 语法:string system(string command, int [retu...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]