php鏂版墜甯哥敤鐨勫嚱鏁�(闅忔椂鏇存柊)

锛忥紡鏁板瓧淇濈暀涓や綅灏忔暟

$n = sprintf("%1.2f", $n);

//鏂规硶浜�

$n = number_format($n, 2, '.', '');

//UTF8杞珿BK

iconv("UTF-8", "GBK", $v);聽 iconv("GBK","UTF-8",$v);

//鑾峰緱瀹㈡埛绔痠p 鍜屾湇鍔″櫒ip

瀹㈡埛绔� getenv("REMOTE_ADDR"); 聽鏈嶅姟鍣ㄧ getenv("SERVER_ADDR") ; 缃戝潃ip gethostbyname(www.heillo.com");

error_reporting(2047) 鐩稿綋浜� error_reporting("E_ALL");

//鎵撳紑php.ini涓殑Safe_mode锛屼細褰卞搷鍝簺鍙傛暟?

system,pathinfo,basename,fopen,exec,proc_open

//鎺掑簭澶氫釜鏁扮粍鎴栦簩缁存暟缁�

array_multisort();

//鏈〉鍦板潃,褰撳墠鑴氭湰鐨勫悕绉�

$_SERVER['PHP_SLLF'];

//鍓嶄竴椤佃剼鏈悕绉�

$_SERVER['HTTP_REFERER'];

//鍥剧墖鐩稿叧

getimagesize () 鑾峰彇鍥剧墖鐨勫昂瀵�

Imagesx () 鑾峰彇鍥剧墖鐨勫搴�

Imagesy () 鑾峰彇鍥剧墖鐨勯珮搴�

//淇敼涓婁紶鏂囦欢澶у皬

php.ini max_file_size

鍏充簬init_set 甯哥敤

ini_set('max_execution_time', '180'); // 璁剧疆鑴氭湰鐨勬渶澶ц繍琛屾椂闂翠负180绉�

ini_set('memory_limit','64M'); // 璁剧疆绋嬪簭鐨勬渶澶у唴瀛樺崰鐢ㄤ负64M锛屾敮鎸佹牸寮�64M,64K,1G锛屾敼閫夐」鍚敤闇�瑕佺紪璇戞椂--enable-memory-limit

ini_set("display_errors", 1); // 灏嗙▼搴忕殑閿欒鍦ㄩ〉闈笂鐩存帴杈撳嚭锛屾柟渚胯皟璇� 聽 error_reporting锛圗_ALL ^ E_NOTICE锛�//閿欒绛夌骇

int_set("max_input_time",'120'); //璁剧疆姣忎釜鑴氭湰鎺ユ敹杈撳叆鏁版嵁鐨勬渶澶у厑璁告椂闂�(POST, GET, upload), 鎸夌璁�

int_set("track_errors",1); // 璁剧疆淇濆瓨鏈�杩戜竴涓敊璇�/璀﹀憡娑堟伅浜庡彉閲�$php_errormsg 涓�,渚夸簬鏀堕泦

int_set("html_errors",0); //绂佺敤鍑洪敊淇℃伅涓殑html鏍囩

ini_set("post_max_size","8M"); //璁剧疆post鏁版嵁鐨勬渶澶у�间负8M锛屼竴鑸渶瑕佸ぇ浜巙pload_max_filesize瑙勫畾鐨勫��

extension_loaded 聽//鍒ゆ柇鏄惁鍔犺浇 gd 搴撴墿灞曘��

你可能感兴趣的:(php鏂版墜甯哥敤鐨勫嚱鏁�(闅忔椂鏇存柊))