ここの情報は古いです。ご理解頂いた上でお取り扱いください。

source: OpenPNE/branches/2_4/public_html/img.php @ 551

Last change on this file since 551 was 551, checked in by takanashi, 17 years ago

img.phpのinclude_pathの指定順修正

File size: 1.3 KB
Line 
1<?php
2/**
3 * @copyright 2005-2006 OpenPNE Project
4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
5 */
6
7require_once './config.inc.php';
8
9// エラー出力を抑制
10ini_set('display_errors', false);
11ob_start();
12
13// include_path の設定
14include_once OPENPNE_LIB_DIR . '/include/PHP/Compat/Constant/PATH_SEPARATOR.php';
15$include_paths = array(
16    OPENPNE_LIB_DIR . '/include',
17    OPENPNE_WEBAPP_DIR . '/lib',
18    ini_get('include_path')
19);
20ini_set('include_path', implode(PATH_SEPARATOR, $include_paths));
21
22// 各種設定
23defined('OPENPNE_IMG_JPEG_QUALITY') or define('OPENPNE_IMG_JPEG_QUALITY', 75);
24if (!empty($GLOBALS['_OPENPNE_DSN_LIST']['image']['dsn'])) {
25    $dsn =  $GLOBALS['_OPENPNE_DSN_LIST']['image']['dsn'];
26} else {
27    $dsn = $GLOBALS['_OPENPNE_DSN_LIST']['main']['dsn'];
28}
29
30
31require_once 'OpenPNE/Img.php';
32$options = array(
33    'dsn'          => $dsn,
34    'cache_dir'    => OPENPNE_IMG_CACHE_DIR,
35    'jpeg_quality' => OPENPNE_IMG_JPEG_QUALITY,
36);
37
38if (defined('USE_IMAGEMAGICK') && USE_IMAGEMAGICK) {
39    require_once 'OpenPNE/Img/ImageMagick.php';
40    $img =& new OpenPNE_Img_ImageMagick($options);
41} else {
42    $img =& new OpenPNE_Img($options);
43}
44$img->set_requests($_GET);
45
46$img->generate_img() or exit(1);
47while (@ob_end_clean());
48
49$img->output_img() or exit(2);
50
51?>
Note: See TracBrowser for help on using the repository browser.