Home >Backend Development >PHP Tutorial >php,该如何处理

php,该如何处理

WBOY
WBOYOriginal
2016-06-13 12:08:42921browse

php
$searchFlg = @$form['searchFlg'];
[email protected]?
------解决思路----------------------
@是錯誤抑制符。
@$form['searchFlg']; 表示$form['searchFlg'];不存在時,不會提示警告信息。
------解决思路----------------------
错误控制运算符:@。当将其放置在一个 PHP 表达式之前,该表达式可能产生的任何错误信息都被忽略掉


上面语句如果不用@ 并且  $form中没有searchFlg项   会出现一个notice的报错



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn