Am uploading a file via ajax following this link This link ive been able to pass the files via ajax but am getting another error when moving the files
I dont want to provide an absolute path in my code like since different codes are used in different areas of the application so i prefer to use the getalis to return the actual path
This is what i have
move_uploaded_file($file_tmp, Yii::getAlias("@uploads/siteimages/slider/").$filename);
This is the filename
$file_ext = pathinfo($_FILES['TblSlider']['name']["file"], PATHINFO_EXTENSION);
$filename = strtotime(date("Y-m-d h:m:s")).".".$file_ext;
Previously i tried using the getUploadedinstance but since its an ajax request it fails
By doing
var_dump($_FILES["TblSlider"]["tmp_name"]) It returns the actual tmp file
The path exisit where i wrong