php配置文件解析
深未来
PHP]
;;;;;;;;;;;
; WARNING ;
;;;;;;;;;;;
; This is the default settings file for new PHPinstallations.
; By default, PHP installs itself with a configuration suitablefor
; development purposes, and *NOT* for production purposes.
; For several security-oriented considerations that should betaken
; before going online with your site, please consultphp.ini-recommended
; and http://php.net/manual/en/security.php.
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; This file controls many aspects of PHP'sbehavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looksfor it in the current
; working directory, in the path designated by the environmentvariable
; PHPRC, and in the path that was defined in compile time (in thatorder).
; Under Windows, the compile-time path is the Windowsdirectory. The
; path in which the php.ini file is looked for can be overriddenusing
; the -c argument in command line mode.
;
; The syntax of the file is extremely simple. Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probablyguessed).
; Section headers (e.g. [Foo]) are also silently ignored, eventhough
; they might mean something in the future.
;
; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different fromFOO=bar.
;
; The value can be a string, a number, a PHP constant (e.g. E_ALLor M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) oran expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string("foo").
;在ini文件本身使用的逻辑值使用的运算符
; Expressions in the INI file are limited to bitwise operators andparentheses:
;| bitwise OR
;& bitwise AND
;~ bitwise NOT
;! boolean NOT
;
; Boolean fla
相关文档:
前提: Apache 和 Mysql已经安装完毕。
php 版本:php-5.2.6.tar.gz
下载地址:
ZendOptimiter-3.3.3-linux-glibc23-i386.tar.gz
下载地址:
1. 首先安装 GD库软件
libxml2-2.7.2.tar.gz
下载地址:
#tar -zxvf libxml2-2.7.2.tar.gz
#cd libxml2-2.7.2
#mkdir /usr/local/modules
#mkdir /usr/loc ......
我们的电话报名系统中,呼叫中心收集了用户的银行信息,然后请求银行的支付接口的webservice,需要进行超时设置,因为不能一直让学员等待
解决方法是
1:首先先要看一下php.ini里的默认超时时间,一般是120秒
2:在php代码里加上
ini_set('default_socket_timeout', 10);//设置超时时间
如下图
......
<?php
/**
* 改变图片的宽高
*
* @author flynetcn (2009-12-16)
*
* @param string $img_src 原图片的存放地址或url
* @param string $new_img_path 新图片的存放地址
* @param int $new_width 新图片的宽度
* @param int $new_height 新图片的高度
* @return bool 成功true, 失败false
* ......
PHP读取MYSQL数据库或MSSQL数据库时,有时出现乱码,这是PHP.ini中配置和.php页面编码不一致引起的。
解决办法:
1、首先,将PHP.ini中设置为default_charset = "gb2312",然后重启Apache。
这时从数据库中提取的结果集可以正常显示中文了,但.php页面中的列名也有可能显示乱码了。这样解决,
2、然后,PH ......
HTTP Only cookies without PHP 5.2
by Matt Mecham
on September 12, 2006
For a while, Microsoft have had a flag
for cookies called ‘httponly’. This doesn’t sound particularly
exciting, but it is a vital step forward for web application security.
This flag tells Internet Expl ......