Home > Backend Development > PHP Tutorial > 求@是啥意思

求@是啥意思

WBOY
Release: 2016-06-23 14:13:41
Original
1322 people have browsed it

$dims = @getimagesize($image)

中间的那个@是啥意思啊


回复讨论(解决方案)

应该是屏蔽错误信息的。虽然屏蔽了,但是错误还在

抑制错误,好让你自己来处理错误。

要不然浏览器直接输出不友好的错误提示来了。

http://php.net/manual/zh/language.operators.errorcontrol.php

PHP 支持一个错误控制运算符:@。当将其放置在一个 PHP 表达式之前,该表达式可能产生的任何错误信息都被忽略掉。具体说明请看上面链接

http://www.baidu.com/s?ie=utf-8&bs=php+%40&f=8&rsv_bp=1&rsv_spt=3&wd=php+%40&inputT=0

百度一搜一大堆

如果加@ 就算这个方法报notice 或者waring错误 也不会在页面显示.

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