symfony2 - PHP GD libray, path to image in Symfony -
i have controller in surgery/patientbundle/constroller/registrationpatientbundlecontroller , in surgery/patientbundle/resources/public/images/test.jpg have image. how path image ? tried code in controller
public testaction(){ header ( 'content-type: image/jpeg' ); $image = imagecreatefromjpeg("../resources/public/images/test.jpg"); imagejpeg($image);
but can't find file.
try :
$image => imagecreatefromjpeg(__dir__.'/../resources/public/images/test.jpg');
php symfony2 gd
No comments:
Post a Comment