php - Upload image error in wordpress custom templete -
i trying code upload image in custom word-press template. working in php. when move on word-press template, shows warning , stop executing script. here code. assume table , folder created proper permission 777. <?php require('../../../wp-load.php'); require('../../../wp-config.php'); function getimageextension($imagetype) { if(empty($imagetype)) return false; switch($imagetype) { case 'image/bmp': return '.bmp'; case 'image/gif': return '.gif'; case 'image/jpeg': return '.jpg'; case 'image/png': return '.png'; default: return false; } } if (!empty($_files["uploadedimage"]["name"])) { $file_name=$_files["uploadedimage"]["name"]; $temp_name=bloginfo('template_directory').$_files["uploadedimage"]["tmp_name"]; $imgtype=$_files["uploadedimage"]["type"]; ...