PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > GD function and URL variable
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
GD function and URL variable

Réponse
 
LinkBack Outils de la discussion
Vieux 04/09/2007, 02h38   #1 (permalink)
Nerd Monster
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut GD function and URL variable

Relative newbie here. I'm sure the solution to this is very simple and I'm
just overlooking
something. I'm using the following code to color an image:

$thishex= 0xFF0000;
$red = imagecolorallocate($im, 0, 0, $thishex);

That works perfect. The problem is, the hex color is coming in the URL
string, without the preceding "0x". To remedy this, I tried:

$hex1 = "0x";
$hex2 = "FF0000";
$thishex = $hex1 . $hex2;
$red = imagecolorallocate($im, 0, 0, $thishex);

This does not work, despite the fact that $thishex echos 0xFF0000. As a
flash
developer, I have run up against this problem before when I don't use strict
data types. As a php newbie, I am not sure that there is a similar
phenomenon in PHP.

Any is much appreciated!






  Réponse avec citation
Vieux 04/09/2007, 03h48   #2 (permalink)
Norman Peelman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: GD function and URL variable

Nerd Monster wrote:
> Relative newbie here. I'm sure the solution to this is very simple and I'm
> just overlooking
> something. I'm using the following code to color an image:
>
> $thishex= 0xFF0000;
> $red = imagecolorallocate($im, 0, 0, $thishex);
>
> That works perfect. The problem is, the hex color is coming in the URL
> string, without the preceding "0x". To remedy this, I tried:
>
> $hex1 = "0x";
> $hex2 = "FF0000";
> $thishex = $hex1 . $hex2;
> $red = imagecolorallocate($im, 0, 0, $thishex);
>
> This does not work, despite the fact that $thishex echos 0xFF0000. As a
> flash
> developer, I have run up against this problem before when I don't use strict
> data types. As a php newbie, I am not sure that there is a similar
> phenomenon in PHP.
>
> Any is much appreciated!
>
>
>
>
>
>


Check back in alt.comp.lang.php for the answer. And then there's
something about cross-posting and not multi-posting...

Norm
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h22.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08502 seconds with 10 queries