[ad_1]
I am locally testing a php function which triggers when a file is uploaded to my website via a form submission. This function will ideally be added to the functions.php theme file and simply gets the file using the built-in WordPress get\_file() function. However, I receive a PHP fatal exception error: call to undefined function. I have tried importing this function into the functions.php file via the require\_once() function giving: $\_SERVER\[‘DOCUMENT\_ROOT’\] . ‘/wp-load.php’ however this doesn’t seem to work. Any help would be appreciated, thanks.
[ad_2]