-
php采集天气预报编码
[PHP教程] 2022-01-15 13:59:52 85人阅读
?php /** * 采集天气预报 * @example * weather::$cache = root.chache/; //如果不改缓存目录,可以不写 * $array = weather::get(); * @author lrenwang * @e-mail [email protected] * */ class weather{ /** * 域...[详细]
-
PHP程序员需养成7个面向对象的好习惯
[PHP教程] 2022-01-15 13:59:27 131人阅读
在 PHP 编程早期,PHP 代码在本质上是限于面向过程的。过程代码 的特征在于使用过程构建应用程序块。过程通过允许过程之间的调用提供某种程度的重用。 但是,没有面向对象的语言构造,程序员仍然可以把 OO 特性引入...[详细]
-
PHP监视linux服务器负载
[PHP教程] 2022-01-15 13:58:57 61人阅读
由于Web Server以及PHP的实现方式所限,我们在现实环境中很难利用PHP去调用一些Linux中需要root权限才能执行的程序,对此,我从网上找到另外一种方式来绕开这个限制。首先先写个c程序中转调用系统命令,然后用PHP去...[详细]
-
PHP图片批量上传代码
[PHP教程] 2022-01-15 13:58:15 98人阅读
?php /* * 名称:PHP单页面图片批量上传管理系统 by zozi * 功能:批量上传图片,自动读取目录,批量删除图片,自动获得图片地址, * 生成复制连接,支持图片水印 (水印支持图片或文字) * 水印参数: * $groundImage...[详细]
-
PHP empty 函数介绍
[PHP教程] 2022-01-15 13:57:41 110人阅读
从表面上看,很容易误解empty()函数是判断字符串是否为空的函数,其实并不是,我也因此吃了很多亏。 empty()函数是用来测试变量是否已经配置。若变量已存在、非空字符串或者非零,则返回 false 值;反之返回 true值...[详细]
-
一个php上传图片的类,带调用办法
[PHP教程] 2022-01-15 13:57:06 117人阅读
调用方法: ?php header(Content-Type:text/html; charset=utf-8); //类的实例化: include(uppoo.php);//类的文件名是upoop.php $up=newupphoto; $submit=$_POST[submit]; if($submit==上传){ $up-get_ph_tmpname($...[详细]
-
一个php的分页类 含调用办法
[PHP教程] 2022-01-15 13:56:43 92人阅读
?php // 方法调用: $pages = new Pages($perpage, $count, $page, showpage.php?page); 创建对象 $pages-setShowPageNum($num); 设置显示的页数 $pages-setCurrentIndexPage($num); 设置当前页在分页栏中的位置 $pag...[详细]
-
PHP随机获取字符代码
[PHP教程] 2022-01-15 13:56:20 70人阅读
?php //获取随机字符 此函数区分字符大小写 如果不区分大小写可加入函数strtolower function genRandomString($len) { $chars = array( a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y...[详细]
-
常用的PHP上传文件的代码实例
[PHP教程] 2022-01-15 13:56:01 178人阅读
动态网站开发中,常用的PHP上传文件的代码实例。 html head meta http-equiv=Content-Type content=text/html; charset=gb2312 title错新网(mycodes.net)文件上传实例/title /head body form enctype=multipart/form...[详细]
-
PHP调用MySQL的存储过程
[PHP教程] 2022-01-15 13:55:20 156人阅读
MySQL好像从5.0开始才引入存储过程,反正以前做应用的时候从没碰过,不过现在因为主要作内部系统,所以很多应用都用到了存储过程,当然前台有时候也需要调用MySQL存储过程,PHP的MySQL Lib好像支持的不是很好,不过...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]