예제 #1
0
파일: index.php 프로젝트: commiunty/Mytest
            case 2:
                header("Content-type: image/png");
                imagepng($this->image);
                break;
            case 3:
                header("Content-type: image/gif");
                imagegif($this->image);
                break;
            default:
                header("Content-type: image/jpeg");
                imagejpeg($this->image);
                break;
        }
        // imagepng($this->image);
    }
    public function test()
    {
        echo __DIR__;
    }
    public function __destruct()
    {
        if ($this->image) {
            $res = imagedestroy($this->image);
            error_log($res, 3, __DIR__ . '/log.log');
        }
    }
}
$data = array('column0' => 'weight', 'column1' => 'yuanjia', 'column2' => 'huodognjia', 'servicePriceName' => 'meirong(hanxizao)', 'canUseMemberPrice' => '', 'canUseDiscountPrice' => '', 'is_default' => 0, 'serviceId' => 9, 'list' => array(array('name' => 'jianzhijia', 'price' => 20.0, 'discountPirce' => 2.0), array('name' => 'yuanjia', 'price' => 30.0, 'discountPirce' => 3.0), array('name' => 'huodongjia', 'price' => 40.0, 'discountPirce' => 4.0)));
$gdImage = new GDImage();
$gdImage->getPicture($data);