本文整理匯總了PHP中Sessions::setHotelImageUploadList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Sessions::setHotelImageUploadList方法的具體用法?PHP Sessions::setHotelImageUploadList怎麽用?PHP Sessions::setHotelImageUploadList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sessions
的用法示例。
在下文中一共展示了Sessions::setHotelImageUploadList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: floor
/* find the "desired height" of this thumbnail, relative to the desired width */
$desired_height = floor($height * ($desired_width / $width));
/* create a new, "virtual" image */
$virtual_image = imagecreatetruecolor($desired_width, $desired_height);
/* copy source image at a resized size */
imagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $desired_width, $desired_height, $width, $height);
/* create the physical thumbnail image to its destination */
imagejpeg($virtual_image, $dest);
//----------------------------------
$image_list .= $upload->file_copy . ',';
$session->setHotelImageUploadList($image_list);
$hotels = new Hotels();
$hotels->setHotelId($hotel_file_id);
$hotels->extractor($hotels->getHotelFromId());
$hotel_img = $hotels->hotelsImages();
//$img_list = "";
if ($hotel_img != '') {
$hotel_img .= ',' . $upload->file_copy;
$hotels->updateHotelsImages($hotel_img);
//$img_list = $hotel_img;
} else {
$hotels->updateHotelsImages($upload->file_copy);
//$img_list = $upload->file_copy;