-
PHP如何获取当前时间?有哪些问题要注意
[PHP教程] 2022-02-21 16:02:03 145人阅读
PHP如何获取当前时间?为了让网站时间准确,在前端开发时,经常会遇到要获取当前时间,而用PHP获取当前时间的方法有很多,但是因为PHP默认的是格林威治时间,不是北京时间,所以我们还需要知道一个概念,就是时间戳...[详细]
-
PHP运用imap收件箱的例子
[PHP教程] 2022-02-21 16:01:28 185人阅读
imap是一款邮件交互访问的协议了,下面我来给大家介绍利用php imap模块来快速获取邮件的例子,有兴趣的朋友可参考一下,列出所有目录,代码如下: $host = {imap.mail.yahoo.com:993/ssl}; $user = user@yahoo.com; $pass...[详细]
-
使用xhprof在开发环境里测试php性能
[PHP教程] 2022-02-21 16:00:54 115人阅读
XHProf是一个分层PHP性能分析工具,它报告函数级别的请求次数和各种指标,包括阻塞时间,CPU时间和内存使用情况,现在我们来聊聊XHProf在开发环境中如何测试php性能. 以百分之一的概率产生测试数据,尽量不影响正式环境效...[详细]
-
php里CURL模拟进行微信接口的GET与POST例子
[PHP教程] 2022-02-21 16:00:23 160人阅读
php CURL函数可以模仿用户进行一些操作,如我们可以模仿用户提交数据也可以模仿用户进行网站访问了,下面我们来介绍利用CURL模拟进行微信接口的GET与POST例子,例子非常的简单就两个大家一起看看. Get提交获取数据 /** ...[详细]
-
php+mysql简单的无限分类栏目
[PHP教程] 2022-02-21 15:59:49 186人阅读
无限分类原理非常的简单就是找到自己上级目录交级递归去操作,然后再找自己的上级直到最上级为止了,这种就可以实现了无限级分类了,下面看个例子. 一个非常简单清晰简单的无极限分类范例,带缩进效果,只需查询一次数据...[详细]
-
PHP运用流类Stream读cUrl下载内容实例
[PHP教程] 2022-02-21 15:56:53 153人阅读
在C++,C#,PHP等编程语言中,有一个stream这个类,所有的I/O都以这个流类为基础的,现在我们来讲讲PHP使用Stream读取cUrl下载结果,使用 stream 的好处就是不会因为数据大小而占用大量的内存,现在我们来分享代码实例,代...[详细]
-
PHP运用QQ免费邮箱发送邮件实例
[PHP教程] 2022-02-21 15:56:10 146人阅读
本例子是利用phpmailer来登录QQ邮件然后利用QQ邮件向指定邮件发送一封邮件的例子,希望本例子能帮助到各位同学. PHP发邮件的例子,发邮件当然需要一个客户端邮箱,今天这个例子是使用QQ免费企业邮箱来做为发邮件的邮箱,...[详细]
-
PHP邮件发送例子,已测验成功
[PHP教程] 2022-02-21 15:55:29 103人阅读
PHP邮件发送例子我介绍过很多不过几乎都是使用phpmailer邮件插件来实现发送了,下面这个例子我是测试发送邮件成功的例子了. 在win下,利用PHP的mail函数来发送邮件. mail()函数的作用:是连接到邮件服务器,利用smtp协议...[详细]
-
用php做四则运算器的实例代码
[PHP教程] 2022-02-21 15:52:38 69人阅读
对于四则运算器,也就是加减乘除计算器,想必大家都有使用过。这篇文章就给大家分享一下用PHP实现简单的四则运算器,这对于刚接触的PHP的朋友,有一定的学习参考价值,感兴趣就继续往下看吧。 前端代码 : !DOCTYPE ...[详细]
-
PHP中json_encode与json_decode有何差别?一文
[PHP教程] 2022-02-21 15:51:44 135人阅读
这篇文章主要介绍PHP中json_encode与json_decode的区别是什么?首先我们先简单了解一下JSON,JSON是一种轻量级的数据交换格式。json_encode()是将数据转为json格式,json_decode()是对json格式的字符串进行解码...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]