コード例 #1
0
ファイル: upload-controller.php プロジェクト: jcodesdotme/pp
function directBookingImage($path)
{
    $pic = $_FILES['pic'];
    $hotels_id = $_REQUEST['hotel_id'];
    $upload_dir = DOC_ROOT . 'uploads/' . $path;
    $new_name = "header-" . $hotels_id . "." . get_extension($pic['name']);
    Sessions::setUploadedLogo($new_name);
    if (move_uploaded_file($pic['tmp_name'], $upload_dir . $new_name)) {
        echo "done";
    }
}