my site is hosted in 000webhost , i already made a directory called "Uploaded CVs" in the file manager, but i get this error :
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect
php code:
<?php
$file_result = "";
if ($_FILES["file"]["error"] >0)
{
$file_result .="File did not upload! Try again!";
$file_result .="Error occured: " . $_FILES["file"]["error"] . "<br>";
}else{
$file_result.=
"Upload: " . $_FILES["file"]["name"] . "<br>" .
"Type: " . $_FILES["file"]["type"] . "<br>" .
"Size: " . ($_FILES["file"]["size"] / 1024 ). " Kb<br>" .
"Temp file: " . $_FILES["file"]["tmp_name"] . "<br>";
move_uploaded_file($_FILES["file"]["tmp_name"],
$_SERVER['DOCUMENT_ROOT'] . "/Uploaded CVs/" . $_FILES["file"]["name"]);
$file_result .= "CV Uploaded Successfully!";
}
?>
any idea whats the correct path? Thanks.