PHP exif 介绍
// PHP exif
// --
// wikipedia 介绍:
// EXIF(Exchangeable image file format)是可交换图像文件的缩写,是专门为数码相机的照片设定的,可以记录数码照片的属性信息和拍摄数据。
// EXIF可以附加于JPEG、TIFF、RIFF等文件之中,为其增加有关数码相机拍摄信息的内容和索引图或图像处理软件的版本信息。
// --
// php 中 exif 可以处理图片的元数据。例如:可以读取数码相机照到的照片的元数据。
// With the exif extension you are able to work with image meta data.
// For example, you may use exif functions to read meta data of pictures taken from digital cameras
// by working with information stored in the headers of the JPEG and TIFF images.
//
// Windows 用户使用该扩展必须启用 mbstring 扩展,并且 mbstring 扩展必须在 exif 之前加在。
// Windows users must enable both the php_mbstring.dll and php_exif.dll DLL's in php.ini.
// The php_mbstring.dll DLL must be loaded before the php_exif.dll DLL so adjust your php.ini accordingly.
// --
//
// 函数
exif_imagetype()
// 1/1
// 获取图片的扩展,返回一个整数,对应于 exif 中的常量
exif_read_data()
// 1/4
// Reads the EXIF headers from JPEG or TIFF, 返回一数组
// EXIF headers tend to be present in JPEG/TIFF images generated by digital cameras,
// but unfortunately each digital camera maker has a different idea of how to actually tag their images,
// so you can't always rely on a specific Exif header being present.
exif_tagname()
// 1/1
exif_thumbnail()
// 1/4
// Retrieve the embedded thumbnail of a TIFF or JPEG image
read_exif_data()
// alias of exif_read_data()
相关文档:
将php服务器架到linux下时没有注意该问题,
前几天倒是碰到了在linux下验证码的图片无法显示的情况,发现linux下也要有gd库的支持,于是安装了php5-gd(本人使用的是php5)
,这个问题解决了
今天突然发现img图片无法显示,上网搜了一把,又经过测试得出如下结论
<img src="pc.jpg"......>
他会以当前路径 ......
如何创建我们的第一个PHP页面呢?非常简单的!选择我们使用的一个最好的设计工具,当然你也可以 只使用记事本。创建之后记得要保存为扩展名为PHP的文件,然后传到我们的服务器
上。
在编写PHP程序之前通常我们需要配置我们的环境,也就是说服务器
要支持PHP才能行啊
一、PHP的基本结构:
使用Incl ......
在php.ini文件中magic_quotes_gpc = on ---- 一般情况下是on,怕用户忘记转义某些特殊字符。
因此,要判断当前php的配置要取得我们想要的内容。
$gpc=get_magic_quotes_gpc(); ----返回1,magic_quotes_gpc = on,0为off
if ($gpc==1){
$json=s ......
PHPnow 是什么?
Win32 下绿色免费的 Apache + PHP + MySQL 环境套件包。
简易安装、快速搭建支持虚拟主机的 PHP 环境。附带 PnCp.cmd 控制面板,帮助你快速配置你的套件,使用非常方便。
PHPnow 是绿色的,解压后执行 Init.cmd 初始化,即可得到一个 PHP + MySQL 环境。
然后就可以直接安装 Discuz!, PHPWind, ......
一、前提
我们需要一个 Web 服务器来解析用 PHP 创建的页面并把它们显示到浏览器。本文中使用的是 Apache2。但是,任何 Web 服务器都可以满足要求。
要利用本文中介绍的一些调试技术,需要安装 Eclipse V3.1.1 和插件 PHPEclipse V ......