-
剖析PHP中多张图片上传并校验的实现
[PHP教程] 2022-04-05 11:22:53 171人阅读
单张的图片上传是不复杂的,这里涉及到多张图片上传和对图片格式的校验,保证上传的一定是图片,防止上传其他文件到服务器。 基本实现算法是使用数组的形式,把所有的图片提交个一个数组,对数组的元素进行一个个的...[详细]
-
简析PHP经典的给图片加水印程序
[PHP教程] 2022-04-05 11:21:46 169人阅读
如果对PHP的GD库比较熟悉,看懂这篇文章一点都不难了! !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titleUntitled/title /head body ?php uptypes=array( image/jpg, image/jpeg, image/...[详细]
-
浅谈保障代码安全,PHP如何进行注入
[PHP教程] 2022-04-05 11:20:59 192人阅读
我们主要是从两点出发,因为我们的获取的变量一般都是通过GET或者POST方式提交过来的,那么我们只要对GET和POST过来的变量进行过滤,那么就能够达到防止注入的效果。而且我们的PHP真是非常好,已经内置了$_GET和$_PO...[详细]
-
揭秘PHP语言中的经典应用窍门
[PHP教程] 2022-04-05 11:20:12 127人阅读
PHP是一门从Unix下发展起来的语言,它有着快速、简洁、明了的特点,本文介绍其在变量、数组和PHP正则表达式、PHP模板应用方面技巧。 1、变量、数组的应用技巧 (1)很多人用得不多的数组函数。foreach、list、each。分...[详细]
-
PHP教程之实施文本文件直接调用
[PHP教程] 2022-04-05 11:19:22 102人阅读
用php实现文本文件内容的直接调用,本文是通过下面方法实现的。 首先使用file函数打开服务器上的一个文本文件,返回的$myFile 就将成为这个文件操作的句柄,然后再通过循环指令,取出文件中每一行的内容并打印出来。...[详细]
-
浅谈新手学习PHP的部分基础知识
[PHP教程] 2022-04-05 11:18:33 144人阅读
浅谈新手学习PHP的一些基础知识 一,PHP脚本代码标记 PHP的脚本是文件中一对特殊标记所包括的内容,如ASP是%....%,PHP可看成是?...?。 然而为了适应XML标准以将PHP嵌入到XML或XHTML中,PHP不建议使用短格式的?...?,...[详细]
-
解析PHP怎样输出简单动态WAP页面
[PHP教程] 2022-04-05 11:17:19 56人阅读
WAP(无线通讯协议)是在数字移动电话、个人手持设备(PDA等)及计算机之间进行通讯的开放性全球标准。WAP应用结构非常类似于Internet,一个典型的WAP应用请求是这样的:首先,具有WAP用户代理功能的移动终端(WAP手...[详细]
-
分析一个经典的PHP显示分页程序
[PHP教程] 2022-04-05 11:16:13 195人阅读
发现一个很漂亮的PHP显示分页程序,显示效果如下 function page($page,$total,$phpfile,$pagesize=10,$pagelen=7){ $pagecode = ;//定义变量,存放分页生成的HTML $page = intval($page);//避免非数字页码 $total = ...[详细]
-
揭秘一个解决PHP中时间加减的函数
[PHP教程] 2022-04-05 11:15:38 58人阅读
在开发过程当中对于时间的操作很是让人头疼。在PHP文档中找到了一个很好的函数,可以对时间进行加减,还是很有意思的。 int strtotime ( string time [, int now] ) 返回类型 int函数可用于时间转换和加减。 下面将...[详细]
-
揭秘PHP程序设置变量的办法
[PHP教程] 2022-04-05 11:14:50 189人阅读
PHP不需要(或者说不支持)在声名变量明确他的变量类型;一个变量的类型是由这个变量被使用的前后关系来决定的,也就是说,如果你给一个变量var赋了 一个字符串的值,var就变成了字符串变量。如果你再将一个整数赋值...[详细]
- 这篇文章主要介绍了Laravel 5.0 发布 新版本特性详解,...[详细]
- 计算两个日期之间的时间差需要先把两个日期转换成纪元...[详细]
- 初步使用面向对象程序设计,要掌握的就是使用面向对象...[详细]
- 每个 PHP 数组内部都有一个指针,该指针指向数组的某...[详细]
- 因为 PHP 是一个 Web 编程语言,在编程过程中难免会遇...[详细]
- PHP 中提供了 return 语句来返回函数的运行结果,其语...[详细]
- final 关键字的作用如下: 使用 final 修饰的类,不能...[详细]
- 在使用 switch 语句时应该注意以下几点: 和 if 语句...[详细]
- 这篇文章主要给大家介绍了关于PHP替换Word中变量并导...[详细]
- 这篇文章主要介绍了PHP常量DIRECTORY_SEPARATOR原理及...[详细]