1
這是我用來檢查一個帖子值是否爲空或不在codeigniter中。檢查POST值Codeigniter
if($this->input->post('inputEmail')) { }
只是想知道什麼是檢查它的最好方法,上述方法或
$temp = $this->input->post('inputEmail');
if(!empty($temp)) { }
這是我用來檢查一個帖子值是否爲空或不在codeigniter中。檢查POST值Codeigniter
if($this->input->post('inputEmail')) { }
只是想知道什麼是檢查它的最好方法,上述方法或
$temp = $this->input->post('inputEmail');
if(!empty($temp)) { }
在PHP isset //檢查檢查變量是否設置與否。
//嘗試這種
if(isset($tmp))
{
//it is set
}
else
{
//not set
}
的可能的複製[檢查是否可變空](http://stackoverflow.com/questions/8777591/check-if-variable-empty) –
第一個是最好的從我的角度來看。 –
一旦經過這個[鏈接](https://zainal.wordpress.com/2006/04/25/8/),你可以自己做出這個決定 – rahulsm