Today I am adding a custom code to wordpress page.php to manage form data including file upload. I just want to check the real page so I can give the path to upload the file in code.
I have this code to upload the file:
$target = "uploads/";
$target = $target . basename($_FILES['pass_doc']['name']);
//Here we check that $ok was not set to 0 by an error
move_uploaded_file($_FILES['pass_doc']['tmp_name'], $target);
$pass_doc = $_FILES['pass_doc']['name'];
But I don't know target path should I give I tried:
$target = "example.org/uploads/";
But its also not working for me. Please give any suggestions.
Thanks