Scroll to top

How to upload file into wordpress child theme folder in wordpress ( file upload) ?

upload file into wordpress child theme folder in wordpress ( file upload)

if(isset($_POST[“submit_p_img”])){


$filename = $_FILES[“p_img”][“name”];
$tempname = $_FILES[“p_img”][“tmp_name”];
echo $folder =  $_SERVER[“DOCUMENT_ROOT”].”/messanger/wp-content/themes/twentytwenty-child/pimg/”.$filename;
move_uploaded_file($tempname,$folder);
}

Leave a Reply

Your email address will not be published.