Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个 if 语句当前$_POST使用 $this->input->post(); 最好的方法是什么?
$_POST
例子:
if($_POST) { Do This }
根据文档,
$this->input->post('value')
如果它不存在则返回值或 false,所以你应该使用这个:
if ($this->input->post('value')) { // 'value' can be safely used now, because we know it's there }