php.ini配置

來源:互聯網
上載者:User

標籤:使用   資料   os   cti   io   amp   

1.variables_order
variables_order = "EGPCS"
這個EGPCS就是說明用$_REQUEST數組擷取內容的優先順序,
其字母的含義分別代表為:E代表$_ENV,G代表$_GET,P代表$_POST,C代表$_COOKIE,S代表$_SESSION。
後面出現的資料會覆蓋前面寫入的資料,其預設的資料寫入方式就是EGPCS,所以COOKIE包含的資料將覆蓋POST/GET中使用相同關鍵字的數。

2.allow_call_time_pass_reference
是否啟用在函數調用時強制參數被按照引用傳遞。

當allow_call_time_pass_reference=Off時
<?php
function abc($a,$b){
echo "$a/n";
echo "$b/n";
$b = ‘cde‘;
}

$a = ‘abc‘;
$b = "bcd";
//不好的用法,會引發一個php warnning
abc($a ,&$b);

echo "$b/n";
?>

  要想通過引用來傳遞參數$b,程式可改為
<?php
function abc($a,& $b){
echo "$a/n";
echo "$b/n";
$b = ‘cde‘;
}

$a = ‘abc‘;
$b = "bcd";
//正確的用法
abc($a ,$b);

echo "$b/n";
//output is:
//abc
//bcd
//cde
?>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.