3
imagecache 생성 이미지의 경로와 크기를 얻기 위해 imagecache_create_path() 및 getimagesize()를 사용하고 있습니다. 그러나 이미지가 아직 존재하지 않는 페이지에 처음 액세스하면 imagecache_create_path가 이미지를 생성하지 않습니다. 파일의 경로를 얻을 수 및 생성 할 수있는 API 방식은imagecache_create_path & getimagesize를 사용하기 전에 Drupal imagecache로 이미지 생성
// we get the image path from a preset (always return the path even if the file doesn't exist)
$small_image_path = imagecache_create_path('gallery_image_small', $image["filepath"]);
// I get the image dimensions (only if the file exists already)
$data_small = list($width, $height, $type, $image_attributes) = @getimagesize($small_image_path);
있습니까 : 여기
코드인가? 즉, 브라우저에서 표시하지 않고 PHP에서 이미지 (사전 설정 사용)를 생성 할 수 있습니까? 사전
훌륭한 작품 : (테스트되지 않은 코드 오타 및 기타 오류/과실 조심 주)
을 : 귀하의 경우, 그것은과 같이 거의 작동합니다. 고맙습니다 :) – ozke
Drupal 6.25에서 페이지로드시 imagecache '
'을 '인쇄'하거나 이미로드중인 응답 내용에 imagecache '
'이 있으면 이미지가 기본적으로 체계. –
atwixtor