php - How to upload xml file to a path in wordpress plugin? -


i'm writing custom plugin import data custom xml wordpress database. after activating plugin , uploading xml file, showing error "sorry, xml files allowed". have used xml file. i'm not sure why file not getting uploaded location. echoed location , file name, file name not being displayed. i'm using php code upload section. not sure i'm following right way. here snapshot , code

enter image description here

here code url: code here

it seems you've not used enctype="multipart/form-data" may first reason file not being uploaded. see here: http://php.net/manual/en/features.file-upload.post-method.php


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -