Accueil > > > CLASSE DE REDIMENSIONNEMENT D'IMAGES PHP
CLASSE DE REDIMENSIONNEMENT D'IMAGES PHP
Information sur la source
Description
Bonjour, Comme promis, voici ma classe de redimensionnement d'images couplée à celle d'upload de fichiers. 3 types de redimensionnement: l'homothétie, le crop (carré ou rectangle), le wallpaper. Lors d'un redimensionnement, le script essaye de centrer au maximum la zone en fonction si l'image source est de type portrait ou paysage. Lors d'un redimensionnement de type "homothety", si on précise largeur+hauteur, le redimensionnement prendra la taille correspondante si l'image source est de type portrait ou paysage. Dans le cas contraire, l'image prendra toujours la largeur comme référence. Par défaut, si le redimensionnement demandé est plus grand que l'image source, afin de ne pas dégrader la qualité de l'image, le redimensionnement ne se fait pas... sauf si on déclare la méthode : setForceDimensions(); La methode setDeleteSource() permet de supprimer l'image source afin de ne garder que les images redimensionnées. La gestion du memory_limit imposé par le serveur est gérée. En effet, votre image source peut contenir "trop" de pixels tout en étant inférieure au poids limite. Si ce cas est rencontré (j'ai testé avec une image de 2000px de large), l'image source sera redimensionnée à 1000px pour les traitements des vignettes suivantes. Ce calcul est effectué grâce au 3ème paramètre du constructeur. C'est le nombre de redimensionnements que l'on compte effectuer. Ce calcul se base sur un memory_limit de 32MO que vous pouvez changer avec la methode setMemoryLimit(). La méthode setMemoryUsed() affiche la mémoire utilisée par le script (en Mo). Si vous avez des questions... j'avoue que mon explication peut être zarbi. Executez class.ImageResize.php sur votre serveur pour utiliser l'exemple qui se trouve tout en bas. Vous devez bien entendu être en PHP5 et avoir activé la bibliothèque GD(2).
Source
- <?php
- class ImageResize {
-
- private $memoryUsed = false;
- private $infosDebug;
-
- private $droits = 0777;
- private $memoryLimit = 32;
-
- private $pathSource;
- private $imgNameSource;
- private $imgSource;
- private $extension;
- private $sizeSource;
- private $typeResize;
-
- private $ressource;
-
- private $forceDimensions = false;
- private $deleteSource = false;
- private $alphaMode = false;
- private $txtImg;
- private $fontFamily = 'polices/arial.ttf';
-
- private $errorResize;
-
- //SET
- public function setMemoryUsed() {
- $this->memoryUsed = true;
- }
- public function setDroits($v) {
- $this->droits = $v;
- }
- public function setnbrResize($v) {
- $this->nbrResize = $v;
- }
- public function setMemoryLimit($v) {
- $this->memoryLimit = $v;
- }
- public function setTxtImg($v) {
- $this->txtImg = $v;
- }
- public function setForceDimensions() {
- $this->forceDimensions = true;
- }
- public function setDeleteSource() {
- $this->deleteSource = true;
- }
- public function setAlphaMode() {
- $this->alphaMode = true;
- }
-
- //GET
- private function getMemory() {
- if($this->extension == ".png" || $this->extension == ".PNG")
- $this->memory = 0;
- else {
- $this->infosDebug = getimagesize($this->imgSource);
- $m_need = round((($this->infosDebug[0]*$this->infosDebug[1]*$this->infosDebug['bits']*$this->infosDebug['channels']/8+pow(2,16))*1.65)*$this->nbrResize);
- $this->memory = round($m_need / pow(1024,2),2);
- }
- }
- public function getImgSource() {
- return $this->imgSource;
- }
- public function getImgName() {
- return $this->imgName;
- }
- public function getErrorResize() {
- return $this->errorResize;
- }
- public function getPathImg() {
- return $this->pathImg;
- }
-
- //CONSTRUCT
- public function __construct($pathSource, $imgName, $extension, $nbrResize=1) {
- if(file_exists($pathSource."/".$imgName.$extension)) {
- $this->pathSource = $pathSource;
- $this->imgName = $imgName;
- $this->extension = $extension;
- $this->imgNameSource = $imgName.$extension;
- $this->imgSource = $pathSource."/".$this->imgNameSource;
- $this->nbrResize = $nbrResize;
-
- $this->getMemory();
- if($this->memory >= $this->memoryLimit) {
- $newSource = new ImageResize($this->pathSource, $this->imgName, $this->extension);
- $this->ressource = $newSource->resize("homothety", $this->pathSource, "1000", substr($this->imgNameSource,0,-4));
- $this->sizeSource = getimagesize($newSource->imgSource);
- imagedestroy($newSource->ressource);
- }
- else {
- if(!$this->imgWorking())
- $this->errorResize = "<b class=''>ERREUR</b> : L'image de travail n'a pas pu être créée";
- }
- }
- else {
- $this->errorResize = "<b class=''>ERREUR</b> : L'image source n'existe pas";
- return false;
- }
- }
-
- //METHOD
- private function imgWorking() {
- $this->sizeSource = getimagesize($this->imgSource);
- switch($this->sizeSource[2]) {
- case 1: // gif
- $this->ressource = @imagecreatefromgif($this->imgSource); break;
- case 2: // jpeg
- $this->ressource = @imagecreatefromjpeg($this->imgSource); break;
- case 3: // png
- $this->ressource = @imagecreatefrompng($this->imgSource); break;
- default:
- $this->errorResize = "<b class=''>ERREUR</b> : L'image source n'est pas reconnue";
- return false;
- }
- return true;
- }
- public function resize($typeResize, $path, $dimensions="", $imgName="") {
- if(is_resource($this->ressource)) {
- $this->typeResize = $typeResize;
- $this->path = $path;
- $this->uniqName($imgName);
-
- switch($this->typeResize) {
- case "homothety":
- $finalImg = $this->defineHomothety($dimensions); break;
- case "homothetyHeight":
- $finalImg = $this->defineHomothety($dimensions, "height"); break;
- case "crop":
- $finalImg = $this->defineCrop($dimensions); break;
- case "wallpaper":
- $finalImg = $this->defineWallpaper(); break;
- }
- if($this->createDir())
- if($this->createImg($finalImg)) {
- $this->getMemory();
- $this->pathImg = $this->path."/".$this->imgName.$this->extension;
- return $finalImg;
- }
- }
- else {
- $this->errorResize = "<b class=''>ERREUR</b> : La ressource de l'image n'est pas accessible";
- return false;
- }
- }
- private function defineHomothety($dimensions, $constraint="") {
- if(preg_match('`\/`', $dimensions)) {
- $tabDimensions = explode("/", $dimensions);
-
- //paysage
- if($this->sizeSource[0] > $this->sizeSource[1]) {
- $width = round($tabDimensions[0]);
- $height = round($this->sizeSource[1]*($tabDimensions[0]/$this->sizeSource[0]));
- }
- //portrait
- else {
- $width = round($this->sizeSource[0]*($tabDimensions[1]/$this->sizeSource[1]));
- $height = round($tabDimensions[1]);
- }
- }
- else {
- if($constraint == "height") {
- $height = round($dimensions);
- $width = round($this->sizeSource[0]*($height/$this->sizeSource[1]));
- }
- else {
- $width = round($dimensions);
- $height = round($this->sizeSource[1]*($width/$this->sizeSource[0]));
- }
- }
- if(!$this->forceDimensions && ($this->sizeSource[0] < $width && $this->sizeSource[1] < $height)) {
- $width = round($this->sizeSource[0]);
- $height = round($this->sizeSource[1]);
- }
-
- $finalImg = imagecreatetruecolor($width, $height);
- if($this->alphaMode)
- $this->alpha($finalImg);
-
- imagecopyresampled($finalImg, $this->ressource, 0, 0, 0, 0, $width, $height, $this->sizeSource[0], $this->sizeSource[1]);
- return $finalImg;
- }
- private function defineCrop($dimensions) {
- if(preg_match('`\/`', $dimensions)) {
- $tabDimensions = explode("/", $dimensions);
- $width = $tabDimensions[0];
- $height = $tabDimensions[1];
- }
- else {
- $width = $dimensions;
- $height = $dimensions;
- }
- if(!$this->forceDimensions && ($this->sizeSource[0] < $width || $this->sizeSource[1] < $height)) {
- $width = $this->sizeSource[0];
- $height = $this->sizeSource[1];
- }
- //RAPPORT
- $rapportWidth = $this->sizeSource[0]/$width;
- $rapportHeight = $this->sizeSource[1]/$height;
- $rapportScale = ($rapportWidth < $rapportHeight)?1/$rapportWidth:1/$rapportHeight;
-
- $ajustWidth = round($this->sizeSource[0]*$rapportScale);
- $ajustHeight = round($this->sizeSource[1]*$rapportScale);
-
- //IMG intermediaire
- $ajustImg = imagecreatetruecolor($ajustWidth, $ajustHeight);
- if($this->alphaMode)
- $this->alpha($ajustImg);
-
- imagecopyresampled($ajustImg, $this->ressource, 0, 0, 0, 0, $ajustWidth, $ajustHeight, $this->sizeSource[0], $this->sizeSource[1]);
-
- //COORDONNEES
- $coordWidthSource = 0;
- $coordHeightSource = 0;
- if($this->sizeSource[0] > $this->sizeSource[1])
- $coordWidthSource = round(($ajustWidth - $width) / 2);
- else
- $coordHeightSource = round(($ajustHeight - $height) / 2);
-
- $finalImg = imagecreatetruecolor($width, $height);
- if($this->alphaMode)
- $this->alpha($finalImg);
-
- imagecopy($finalImg, $ajustImg, 0, 0, $coordWidthSource, $coordHeightSource, $ajustWidth, $ajustHeight);
- return $finalImg;
- }
- private function defineWallpaper() {
- return $this->ressource;
- }
- private function createImg($finalImg) {
- $this->writeTxtImg($finalImg);
- if($this->alphaMode)
- $this->alpha($finalImg);
-
- switch($this->sizeSource[2]) {
- case 1: // gif
- $op = imagegif($finalImg, $this->path."/".$this->imgName.$this->extension, 100); break;
- case 2: // jpeg
- $op = imagejpeg($finalImg, $this->path."/".$this->imgName.$this->extension, 100); break;
- case 3: // png
- $op = imagepng($finalImg, $this->path."/".$this->imgName.$this->extension); break;
- default:
- $this->errorResize = "<b class=''>ERREUR</b> : L'image ".$this->imgName." n'a pas pu être redimentionée";
- return false; break;
- }
- return $op;
- }
- private function alpha($img) {
- imagealphablending($img, false);
- imagesavealpha($img, true);
- }
- private function writeTxtImg($img) {
- if($this->txtImg != "" && $this->typeResize == "wallpaper") {
- $shadow = imagecolorallocate($this->ressource, 128, 128, 128);
- $blanc = imagecolorallocate($this->ressource, 223, 223, 223);
- $police = 20;
- putenv('GDFONTPATH='.realpath('.'));
-
- $font = $this->fontFamily;
-
- imagettftext($img, $police, 0, 25, 40, $shadow, $font, $this->txtImg);
- imagettftext($img, $police, 0, 26, 41, $blanc, $font, $this->txtImg);
- }
- }
- private function uniqName($imgName) {
- if($imgName == "")
- $imgName = uniqid("", true);
- $this->imgName = $imgName;
- }
- private function createDir() {
- if($this->path != "") {
- if(preg_match('`\/`', $this->path)) {
- $path = explode("/", $this->path);
- $newDir = "";
- foreach($path as $dir) {
- if($dir == "..") {
- $newDir .= "../";
- continue;
- }
- if(!file_exists($newDir.$dir))
- mkdir($newDir.$dir, $this->droits);
-
- $newDir .= $dir."/";
- }
- }
- else if(!file_exists($this->path))
- mkdir($this->path, $this->droits);
-
- return true;
- }
- else {
- $this->errorResize = "<b class=''>ERREUR</b> : Aucune destination n'a été spécifiée";
- return false;
- }
- }
- public function deleteFile($file) {
- if(file_exists($file)) {
- @unlink($file);
- return true;
- }
- else
- return false;
- }
- public function __destruct() {
- if($this->deleteSource) {
- if(!$this->deleteFile($this->imgSource))
- $this->errorResize = "<b class=''>ERREUR</b> : Impossible de supprimer l'image source";
- }
- if($this->memoryUsed)
- echo $this->errorResize = "<br /><b class=''>DEBUG</b> : ".$this->memory." Mo de cache utilisée";
-
- if(is_resource($this->ressource))
- imagedestroy($this->ressource);
- }
- }
- ?>
<?php
class ImageResize {
private $memoryUsed = false;
private $infosDebug;
private $droits = 0777;
private $memoryLimit = 32;
private $pathSource;
private $imgNameSource;
private $imgSource;
private $extension;
private $sizeSource;
private $typeResize;
private $ressource;
private $forceDimensions = false;
private $deleteSource = false;
private $alphaMode = false;
private $txtImg;
private $fontFamily = 'polices/arial.ttf';
private $errorResize;
//SET
public function setMemoryUsed() {
$this->memoryUsed = true;
}
public function setDroits($v) {
$this->droits = $v;
}
public function setnbrResize($v) {
$this->nbrResize = $v;
}
public function setMemoryLimit($v) {
$this->memoryLimit = $v;
}
public function setTxtImg($v) {
$this->txtImg = $v;
}
public function setForceDimensions() {
$this->forceDimensions = true;
}
public function setDeleteSource() {
$this->deleteSource = true;
}
public function setAlphaMode() {
$this->alphaMode = true;
}
//GET
private function getMemory() {
if($this->extension == ".png" || $this->extension == ".PNG")
$this->memory = 0;
else {
$this->infosDebug = getimagesize($this->imgSource);
$m_need = round((($this->infosDebug[0]*$this->infosDebug[1]*$this->infosDebug['bits']*$this->infosDebug['channels']/8+pow(2,16))*1.65)*$this->nbrResize);
$this->memory = round($m_need / pow(1024,2),2);
}
}
public function getImgSource() {
return $this->imgSource;
}
public function getImgName() {
return $this->imgName;
}
public function getErrorResize() {
return $this->errorResize;
}
public function getPathImg() {
return $this->pathImg;
}
//CONSTRUCT
public function __construct($pathSource, $imgName, $extension, $nbrResize=1) {
if(file_exists($pathSource."/".$imgName.$extension)) {
$this->pathSource = $pathSource;
$this->imgName = $imgName;
$this->extension = $extension;
$this->imgNameSource = $imgName.$extension;
$this->imgSource = $pathSource."/".$this->imgNameSource;
$this->nbrResize = $nbrResize;
$this->getMemory();
if($this->memory >= $this->memoryLimit) {
$newSource = new ImageResize($this->pathSource, $this->imgName, $this->extension);
$this->ressource = $newSource->resize("homothety", $this->pathSource, "1000", substr($this->imgNameSource,0,-4));
$this->sizeSource = getimagesize($newSource->imgSource);
imagedestroy($newSource->ressource);
}
else {
if(!$this->imgWorking())
$this->errorResize = "<b class=''>ERREUR</b> : L'image de travail n'a pas pu être créée";
}
}
else {
$this->errorResize = "<b class=''>ERREUR</b> : L'image source n'existe pas";
return false;
}
}
//METHOD
private function imgWorking() {
$this->sizeSource = getimagesize($this->imgSource);
switch($this->sizeSource[2]) {
case 1: // gif
$this->ressource = @imagecreatefromgif($this->imgSource); break;
case 2: // jpeg
$this->ressource = @imagecreatefromjpeg($this->imgSource); break;
case 3: // png
$this->ressource = @imagecreatefrompng($this->imgSource); break;
default:
$this->errorResize = "<b class=''>ERREUR</b> : L'image source n'est pas reconnue";
return false;
}
return true;
}
public function resize($typeResize, $path, $dimensions="", $imgName="") {
if(is_resource($this->ressource)) {
$this->typeResize = $typeResize;
$this->path = $path;
$this->uniqName($imgName);
switch($this->typeResize) {
case "homothety":
$finalImg = $this->defineHomothety($dimensions); break;
case "homothetyHeight":
$finalImg = $this->defineHomothety($dimensions, "height"); break;
case "crop":
$finalImg = $this->defineCrop($dimensions); break;
case "wallpaper":
$finalImg = $this->defineWallpaper(); break;
}
if($this->createDir())
if($this->createImg($finalImg)) {
$this->getMemory();
$this->pathImg = $this->path."/".$this->imgName.$this->extension;
return $finalImg;
}
}
else {
$this->errorResize = "<b class=''>ERREUR</b> : La ressource de l'image n'est pas accessible";
return false;
}
}
private function defineHomothety($dimensions, $constraint="") {
if(preg_match('`\/`', $dimensions)) {
$tabDimensions = explode("/", $dimensions);
//paysage
if($this->sizeSource[0] > $this->sizeSource[1]) {
$width = round($tabDimensions[0]);
$height = round($this->sizeSource[1]*($tabDimensions[0]/$this->sizeSource[0]));
}
//portrait
else {
$width = round($this->sizeSource[0]*($tabDimensions[1]/$this->sizeSource[1]));
$height = round($tabDimensions[1]);
}
}
else {
if($constraint == "height") {
$height = round($dimensions);
$width = round($this->sizeSource[0]*($height/$this->sizeSource[1]));
}
else {
$width = round($dimensions);
$height = round($this->sizeSource[1]*($width/$this->sizeSource[0]));
}
}
if(!$this->forceDimensions && ($this->sizeSource[0] < $width && $this->sizeSource[1] < $height)) {
$width = round($this->sizeSource[0]);
$height = round($this->sizeSource[1]);
}
$finalImg = imagecreatetruecolor($width, $height);
if($this->alphaMode)
$this->alpha($finalImg);
imagecopyresampled($finalImg, $this->ressource, 0, 0, 0, 0, $width, $height, $this->sizeSource[0], $this->sizeSource[1]);
return $finalImg;
}
private function defineCrop($dimensions) {
if(preg_match('`\/`', $dimensions)) {
$tabDimensions = explode("/", $dimensions);
$width = $tabDimensions[0];
$height = $tabDimensions[1];
}
else {
$width = $dimensions;
$height = $dimensions;
}
if(!$this->forceDimensions && ($this->sizeSource[0] < $width || $this->sizeSource[1] < $height)) {
$width = $this->sizeSource[0];
$height = $this->sizeSource[1];
}
//RAPPORT
$rapportWidth = $this->sizeSource[0]/$width;
$rapportHeight = $this->sizeSource[1]/$height;
$rapportScale = ($rapportWidth < $rapportHeight)?1/$rapportWidth:1/$rapportHeight;
$ajustWidth = round($this->sizeSource[0]*$rapportScale);
$ajustHeight = round($this->sizeSource[1]*$rapportScale);
//IMG intermediaire
$ajustImg = imagecreatetruecolor($ajustWidth, $ajustHeight);
if($this->alphaMode)
$this->alpha($ajustImg);
imagecopyresampled($ajustImg, $this->ressource, 0, 0, 0, 0, $ajustWidth, $ajustHeight, $this->sizeSource[0], $this->sizeSource[1]);
//COORDONNEES
$coordWidthSource = 0;
$coordHeightSource = 0;
if($this->sizeSource[0] > $this->sizeSource[1])
$coordWidthSource = round(($ajustWidth - $width) / 2);
else
$coordHeightSource = round(($ajustHeight - $height) / 2);
$finalImg = imagecreatetruecolor($width, $height);
if($this->alphaMode)
$this->alpha($finalImg);
imagecopy($finalImg, $ajustImg, 0, 0, $coordWidthSource, $coordHeightSource, $ajustWidth, $ajustHeight);
return $finalImg;
}
private function defineWallpaper() {
return $this->ressource;
}
private function createImg($finalImg) {
$this->writeTxtImg($finalImg);
if($this->alphaMode)
$this->alpha($finalImg);
switch($this->sizeSource[2]) {
case 1: // gif
$op = imagegif($finalImg, $this->path."/".$this->imgName.$this->extension, 100); break;
case 2: // jpeg
$op = imagejpeg($finalImg, $this->path."/".$this->imgName.$this->extension, 100); break;
case 3: // png
$op = imagepng($finalImg, $this->path."/".$this->imgName.$this->extension); break;
default:
$this->errorResize = "<b class=''>ERREUR</b> : L'image ".$this->imgName." n'a pas pu être redimentionée";
return false; break;
}
return $op;
}
private function alpha($img) {
imagealphablending($img, false);
imagesavealpha($img, true);
}
private function writeTxtImg($img) {
if($this->txtImg != "" && $this->typeResize == "wallpaper") {
$shadow = imagecolorallocate($this->ressource, 128, 128, 128);
$blanc = imagecolorallocate($this->ressource, 223, 223, 223);
$police = 20;
putenv('GDFONTPATH='.realpath('.'));
$font = $this->fontFamily;
imagettftext($img, $police, 0, 25, 40, $shadow, $font, $this->txtImg);
imagettftext($img, $police, 0, 26, 41, $blanc, $font, $this->txtImg);
}
}
private function uniqName($imgName) {
if($imgName == "")
$imgName = uniqid("", true);
$this->imgName = $imgName;
}
private function createDir() {
if($this->path != "") {
if(preg_match('`\/`', $this->path)) {
$path = explode("/", $this->path);
$newDir = "";
foreach($path as $dir) {
if($dir == "..") {
$newDir .= "../";
continue;
}
if(!file_exists($newDir.$dir))
mkdir($newDir.$dir, $this->droits);
$newDir .= $dir."/";
}
}
else if(!file_exists($this->path))
mkdir($this->path, $this->droits);
return true;
}
else {
$this->errorResize = "<b class=''>ERREUR</b> : Aucune destination n'a été spécifiée";
return false;
}
}
public function deleteFile($file) {
if(file_exists($file)) {
@unlink($file);
return true;
}
else
return false;
}
public function __destruct() {
if($this->deleteSource) {
if(!$this->deleteFile($this->imgSource))
$this->errorResize = "<b class=''>ERREUR</b> : Impossible de supprimer l'image source";
}
if($this->memoryUsed)
echo $this->errorResize = "<br /><b class=''>DEBUG</b> : ".$this->memory." Mo de cache utilisée";
if(is_resource($this->ressource))
imagedestroy($this->ressource);
}
}
?>
Historique
- 18 mai 2010 14:40:59 :
- Correction d'une faute d'aurteaugraffe dans le titre.
- 18 mai 2010 15:06:39 :
- N.B: Vous pouvez aussi écrire sur l'image, il suffit de déclarer la méthode setTxtImg(); le chemin vers la police est déclarée en haut de la classe.
- 18 mai 2010 16:24:22 :
- Modification de l'instanciation, j'ai préféré séparer l'extension de nom de l'image.
- 20 mai 2010 14:56:29 :
- Ouups^^
- 26 mai 2010 18:10:15 :
- Nouvelle option "homothetyHeight" pour une image homothethique contrainte sur la hauteur
- 26 mai 2010 18:46:13 :
- Meme que y a 5 minutes
- 27 mai 2010 01:05:01 :
- Ajout de la methode setAlphaMode() pour garder la transparence des images png
- 27 mai 2010 10:33:52 :
- Petites corrections diverses
- 27 mai 2010 15:51:20 :
- Modification du type mime png pour IE sur la classe upload
- 10 juin 2010 10:50:39 :
- Ajout de la methode getPathImg();
Elle retourne l'image redimentionnée.
Sources du même auteur
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
Upload dossier d'images et traitement [ par Silou ]
Bonjour,Je possède un site de vente de photo online, et le problème pour moi est que je doit parfois uploader sur le serveur des 10 ène d'images, vous
multiple upload a mysql avec php [ par Xavihb ]
Salut,J'aurais besoin de savoir comment faire un multiple upload d'images à une base de données mySQL à l'aide de PHP. Les champs des i
upload d'images [ par fedebul ]
bonjour, j'ai trouvé un script qui permet un upload d'images sur le serveur, mais j'aimerais que ces images soient rangées dans une feuille XML, pour
upload + affichage images [ par ultra_nezz ]
Bonjour,voila je cherche mais ne trouve pas ,une petite source (si elle est petite )qui pourrait m'aider a finir mon petit site persoj'aimerais avoir
upload d'images et virus???? [ par mickadevelop ]
Bonjour à tous,Je vois beaucoup de codes concernant l'upload d'images sur un serveur mais par contre je ne trouve pas d'info sur les potentiels virus
Upload et redimensionnement [ par piep14 ]
Bonsoir, j'ai essayé d'utiliser ce code d'un membre :http://www.phpcs.com/codes/CLASSE-POUR-GERER-REDIMENSIONS-IMAGES-AVEC-GD_29407.aspxCa marche très
Variable dans une URL [ par L0rD59 ]
Bonjours j'ai un petit souci avec une variable et une URLje vous explique le contexte J'ai une fichier PHP qui permet d'upload des image (grace au bou
Upload , nom d'image, BDD mysql [ par Grumo ]
Bonjour à tous,voilà je me suis constitué un petit formulaire me permettant d'uploader des images dans une bdd msql (enfin leur n
Pb d'upload d'images [ par devillersdavid ]
Bonjour à tous,J'arrive à uploader correctement certaines images sur mon site mais d'autres sont mal uploadées.J'utilise le script du s
wamp+upload des images [ par imaneflash ]
comment faire l upload des images je veux les stocker sur mon disque dur c posssible!?
|
Derniers Blogs
IMAGINE CUP 2012, MAKE A SIGN EN FINALEIMAGINE CUP 2012, MAKE A SIGN EN FINALE par junarnoalg
Voilà qui est fait, la nouvelle est officielle ! L'équipe belge "Make a Sign" va au pays des kangourous défendre son projet dans la catégorie Software Design. http://www.imaginecup.com/CompetitionsContent/Competition/WorldwideFinalists.aspx V...
Cliquez pour lire la suite de l'article par junarnoalg KINECT 1.5 IS OUT !KINECT 1.5 IS OUT ! par Vko
La version 1.5 du Kinect For Microsoft vient tout juste de sortir ! Plein de nouveautés: Tracking de squelette en Near Mode Détection en position assise Détection faciale avec un SDK dédié Documentation et des guideline (enfin) Un out...
Cliquez pour lire la suite de l'article par Vko LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) LES ACTUALITéS DE LA SEMAINE SUR C2I.FR (14 MAI - 20 MAI) par richardc
Mise à jour des Web API du 14 Mai
Réservez dès maintenant votre journée du 20 juin pour le Windows Azure Dev Camp 2012 à Paris
Mise à jour de Team Foundation Service
MechCommander 2 sur Windows 8
Entity Framework 5 Release Candidate e...
Cliquez pour lire la suite de l'article par richardc REACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITERREACTIVE EXTENSIONS : CONSOMMER DES SERVICES AVEC RX PARTIE 3, LES PIèGES à éVITER par Groc
Une mauvaise utilisation de rx lors de l'écriture d'une couche d'accès à des services peut conduire à des cas embarassants avec des erreurs mal gérées, des appels qui ne partent lorsqu'ils le devraient, et même des résultats incorrects . le tout nuis...
Cliquez pour lire la suite de l'article par Groc SHAREPOINT BLOG SITE, PROBLèME D'ARCHIVESSHAREPOINT BLOG SITE, PROBLèME D'ARCHIVES par junarnoalg
Dernièrement, nous avons migré le site
myTIC
vers un nouveau serveur SharePoint 2010. Dans les contenus que nous vouloins récupérer, nous avions un certain nombre de blogs.
Nous avons utilisé les commandes Power...
Cliquez pour lire la suite de l'article par junarnoalg
Forum
GOOGLE MAPGOOGLE MAP par fatmanajjar
Cliquez pour lire la suite par fatmanajjar
Logiciels
sDEVIS-FACTURES vlPRO (8.1.0.3)SDEVIS-FACTURES VLPRO (8.1.0.3)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO 974 Application Server (12.2.4.6)974 APPLICATION SERVER (12.2.4.6)Développez de puissantes applications dans un environnement de 'cloud computing', clusterisé, séc... Cliquez pour télécharger 974 Application Server vPicture (1.4.2.1)VPICTURE (1.4.2.1)Avec vPicture, hébergez vos images facilement et rapidement.
vPicture est un utilitaire simple, ... Cliquez pour télécharger vPicture Easy-Planning (2.2.1.6)EASY-PLANNING (2.2.1.6)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté au... Cliquez pour télécharger Easy-Planning COM-BACKUP (2.0)COM-BACKUP (2.0)
COM-BACKUP est un logiciel de sauvegarde qui permet de planifier les sauvegardes de vos dossiers ...
Cliquez pour télécharger COM-BACKUP
|