mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
added note that getimagesize() is not suitable to detect whether a file is an
image (contributed by Boris Madzar) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337230 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f4f505e665
commit
1f4b86ab4b
1 changed files with 12 additions and 0 deletions
|
@ -273,6 +273,18 @@ if (isset($info["APP13"])) {
|
|||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.gd.notrequired;
|
||||
<note>
|
||||
<para>
|
||||
This function expects <parameter>filename</parameter> to be a valid
|
||||
image file. If a non-image file is supplied, it may be incorrectly
|
||||
detected as an image and the function will return successfully.
|
||||
</para>
|
||||
<para>
|
||||
Do not use <function>getimagesize</function> to check that a given
|
||||
file is a valid image. Use a purpose-built solution such as the
|
||||
<link linkend="book.fileinfo">Fileinfo</link> extension instead.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
|
|
Loading…
Reference in a new issue