Fork me on GitHub

Rapport de message :*
 

Re: mainfile.php et header incompatibles ?

Titre du sujet : Re: mainfile.php et header incompatibles ?
par ninjodo sur 21/07/2015 17:36:16

Je mets mon code, à tout hasard...

Citation :

//if (file_exists("mainfile.php")) { //include("mainfile.php");
//} elseif (file_exists("../mainfile.php")) {
//include("../mainfile.php");
//} else { //include("../../mainfile.php");
//}

include(XOOPS_ROOT_PATH."/modules/cotations/include/fonctions.inc.php");

$chemin = XOOPS_ROOT_PATH."/modules/cotations/uploads/images/70393/_MG_0200_Greta_De_Lazzaris___Copier_.jpg";
$ini_filename = $chemin;

$im = imagecreatefromjpeg($ini_filename );

$ini_x_size = getimagesize($ini_filename )[0];
$ini_y_size = getimagesize($ini_filename )[1];

//the minimum of xlength and ylength to crop.
$crop_measure = min($ini_x_size, $ini_y_size);

header('Content-Type: image/jpeg');

$to_crop_array = array('x' =>0, 'y' => 200, 'width' => $ini_x_size, 'height'=> "200");
$thumb_im = imagecrop($im, $to_crop_array);
imagejpeg($thumb_im, NULL, 100);

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

30 Personne(s) en ligne (23 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 30 | Plus ...