I'm trying to correct deprecated PHP code, in this case $HTTP_POST_FILES
but I am unsure if I still need to declare global
i.e change global $HTTP_POST_FILES
to global $_FILES
I'm guessing not. Would the following re-code be correct?
Original code snippet:
function upload_doc($fieldName)
{
global $HTTP_POST_FILES;
if (isset($HTTP_POST_FILES[$fieldName]) &&
.......more stuff
Re-code:
function upload_doc($fieldName)
{
if (isset($_FILES[$fieldName]) &&
.......more stuff