I want to resize some images uploaded in a form and storing the filename in the database. And after resized the image use it in a pdf report.
In the PDFReport I created an event ONRECORD.
$LOGO = {dataemp[0][1]};
$image_directory = $_SESSION[‘scriptcase’][‘tra_pdfreport_myapp’][‘glo_nm_path_imagens’];
$file = ‘$image_directory’./.’$LOGO’; //‘your_path_to_file/file.png’;
$resizedFile = ‘$image_directory/$logonuevo’; //your_path_to_file/resizedFile.png
smart_resize_image($file , null, 300 , 100 , true , $resizedFile , false , false ,100 );
{LOGO} = ‘logo4.png’;//
I Got an error: Image file not found.
I tried with the deployment path in my MAC “(’/Applications/Scriptcase/v9/wwwroot/scriptcase/file/img/)” and works fine, but in production didn`t find the image. I think because the Path in server is different. How can I put a Path in developmet that works in both environments?
Regards!.