php,该如何处理

WBOY
Release: 2016-06-13 12:08:42
Original
880 people have browsed it

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


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



Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!