PHP error function is deprecated

Hi Guys i have a upload code to upload files to my website the page is called fileuploader.php

the error i get is

[06-Jan-2020 19:59:04 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/mywebcha/public_html/test/fileuploader.php on line 5

line 5 of the php is

$allowed = array(‘jpg’,‘jpeg’,‘gif’,‘png’,‘pdf’);

any advice please

HI.
“The each() function is deprecated.”
This means, this function possible will not be availabe in later PHP versions. At this point its not a error, its simply the hint, to be avoid using this php function and its better to use a replacenet for it. (With this function you could run into problems, in the next php versions)

  • Your ‘line 5’ seems to be not the line 5, the logfiles inform you about. Maybe the next codeline is using the each() function.

Thank you for your advice.

Sponsor our Newsletter | Privacy Policy | Terms of Service