begin process at 2012 05 27 22:11:03
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Class et Objet ( POO )

 > CLASS TAG GENERAL

CLASS TAG GENERAL


 Information sur la source

Note :
Aucune note
Catégorie :Class et Objet ( POO ) Classé sous :tag, ouvre, ferme, ajoute, creation Niveau :Débutant Date de création :05/08/2009 Date de mise à jour :28/08/2009 11:56:21 Vu / téléchargé :1 846 / 89

Auteur : astro53

Ecrire un message privé
Commentaire sur cette source (4)
Ajouter un commentaire et/ou une note

 Description

cette class permet de gener toutes sortes de tableaux, formulaire, dropdown...Peut etre sera elle utile a quelqu'un...
pour les attributs je laisse la possibilite de les ecrires sous deux formes
array(x => y,a => b)...
ou bien directement "x='y'"
Attention au quotes.
A bientot pour de nouvelles sources.

Source

  • <?php
  • /********************************/
  • /* AstroProduction */
  • /* Version 1.0 */
  • /* All Right Reserved */
  • /* 2009 */
  • /********************************/
  • class tags
  • {
  • /*Variables:*/
  • /*
  • *@param string $content contain the openTag addTags and closeTag function result
  • *This variable will be usable in extanded classes
  • *We dont want that an instance modify this variables content so we use protected
  • *@param string $openTag contain the openTag name help to close the same tag that was open
  • *@param string $openContent if exist contain the content of the openTag function
  • *will be use for modification or repeat
  • *@param string $addContent contain the content of the add function
  • *will be used for repeat or modify function.
  • *@param array:$save save a portion of content. can get it later
  • */
  • protected $content;
  • protected $openTag = array();
  • protected $openContent = array();
  • protected $addContent = array();
  • protected $save = array();
  • /*Functions:*/
  • /*
  • *@param function:__construct destroy all variables content if there is
  • */
  • public function __construct()
  • {
  • $this->content = "";
  • $this->openTag = array();
  • $this->openContent = array();
  • $this->addContent = array();
  • $this->save = array();
  • }
  • /*
  • *@param function:__destruct destroy all variables content
  • */
  • public function __destroy()
  • {
  • $this->content = "";
  • $this->openTag = array();
  • $this->openContent = array();
  • $this->addContent = array();
  • $this->save = array();
  • }
  • /*
  • *@param function:openTag open a tag like table, optgroup...
  • *
  • *@param string $name name of the tag e.g: table, tr, select...
  • *@optional param array $attributes the tag can get attributes x => y as x='y'...
  • *@optional param string $attributes the tag can get attributes x='y'...
  • *@optional param array $content e.g can be used for list <li>$content<ul><li>....
  • *@optional param boolean $tagUnique if it is a unique tag like <br /> we have to close it with an antislash (for XHTML)...
  • *@optional param echo $echo write the contenr and clear the openContent
  • *if the tag will be close after the content you can use addTags function
  • */
  • public function openTag($name,$attributes = null,$content = null,$tagUnique = null,$echo = null)
  • {
  • if($name && !is_string($name))
  • {
  • throw new Exception('open wrong name tag');
  • return;
  • }
  • //memories the open tag for the close function
  • if(!$tagUnique)
  • {
  • $this->openTag[$name] = $name;
  • }
  • $open = "<".$name;
  • if($attributes)
  • {
  • $open .= " ";
  • if(is_array($attributes))
  • {
  • foreach($attributes as $attrKey => $attrValue)
  • {
  • $open .= $attrKey."='".$attrValue."' ";
  • }
  • }
  • else
  • {
  • $open .= $attributes;
  • }
  • }
  • if($tagUnique)
  • {
  • $open .= $content ? "/>".$content : "/>";
  • }
  • else
  • {
  • $open .= $content ? ">".$content : ">";
  • }
  • $this->content .= $open;
  • //memories the content for duplicate or modify
  • $this->openContent[$open] = $open;
  • if($echo)
  • {
  • echo $this->content;
  • $this->content = "";
  • }
  • else
  • {
  • return $this->content;
  • }
  • }
  • /*
  • *@param function:closeTag close the tag opened with openTag function
  • *
  • *@param string $number number of tags to close
  • */
  • public function closeTag($number = null)
  • {
  • if(!$number)
  • $number = 1;
  • if($number && is_numeric($number))
  • {
  • for($i = 0; $i < $number; $i++)
  • {
  • $closeTag = array_pop($this->openTag);
  • $close = "</".$closeTag.">";
  • $this->content .= $close;
  • }
  • }
  • return $this->content;
  • }
  • /*
  • *@param function:addTags add a tag with open content close
  • *
  • *@param string:$name name of the tag;
  • *@param string $content the content to put between the tags
  • *@optional param array $attrTag attributes that the tag can get attributes x => y as x='y'
  • *@optional param string $attrTag the tag can get attributes x='y'...
  • *@optional param echo $echo write the contenr and clear the addContent
  • */
  • public function addTags($name,$content,$attrTag = null,$echo = null)
  • {
  • if($name && !is_string($name))
  • {
  • throw new Exception('add wrong name tag');
  • return;
  • }
  • $tags = "<".$name;
  • if($attrTag)
  • {
  • $tags .= " ";
  • if(is_array($attrTag))
  • {
  • foreach($attrTag as $tagKey => $tagValue)
  • {
  • $tags .= $tagKey."='".$tagValue."' ";
  • }
  • }
  • }
  • else
  • {
  • $tags .= $attrTag;
  • }
  • $tags .= ">".$content."</".$name.">";
  • $this->content .= $tags;
  • //memories the content for duplicate or modify
  • $this->addContent[$tags] = $tags;
  • if($echo)
  • {
  • echo $this->content;
  • $this->addContent = "";
  • }
  • else
  • {
  • return $this->content;
  • }
  • }
  • /*
  • *@param function:create print the $content variable and reset all variables
  • */
  • public function create()
  • {
  • $create = $this->content;
  • return $create;
  • }
  • /**
  • *@param function:repeatTag repeat first last or all of the tags write before;
  • *
  • *@param string:$name type to repeat, can take firstO, firstA, lastO, O, A, and lastA values
  • *O for openTag and A for Add tag if $name null repeat all the tags.
  • *@param integer:$number number of repetition of the tags null repeat once.
  • *@param integer:$int tag number n to be repeated works only when name == A for add or O for open
  • *@optional param echo $echo write the contenr and clear the openContent and addContent
  • */
  • public function repeatTag($name = null,$number = null,$int = null,$echo = null)
  • {
  • $result = "";
  • if($name && !is_string($name))
  • throw new Exception("Invalid name");
  • if($number && !is_numeric($number))
  • throw new Exception("Invalid number");
  • if($name && is_string($name))
  • {
  • if($name === "firstO")
  • {
  • $content = array_shift($this->openContent);
  • if($number && is_numeric($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result = $content;
  • }
  • elseif($name == "firstA")
  • {
  • $content = array_shift($this->addContent);
  • if($number && is_numeric($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result = $content;
  • }
  • elseif($name == "lastO")
  • {
  • $content = array_pop($this->openContent);
  • if($number && is_numeric($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result = $content;
  • }
  • elseif($name == "lastA")
  • {
  • $content = array_pop($this->addContent);
  • if($number && is_numeric($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result = $content;
  • }
  • elseif($name == "O")
  • {
  • if($int && is_int($int))
  • {
  • for($n = 0; $n < $int; $n++)
  • {
  • $content = array_shift($this->openContent);
  • }
  • }
  • if($number && is_int($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result .= $content;
  • }
  • elseif($name == "A")
  • {
  • if($int && is_int($int))
  • {
  • for($n = 0; $n < $int; $n++)
  • {
  • $content = array_shift($this->addContent);
  • }
  • }
  • if($number && is_int($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result .= $content;
  • }
  • }
  • elseif(!$name)
  • {
  • $content = $this->content;
  • if($number && is_numeric($number))
  • {
  • for($n = 0; $n < $number; $n++)
  • {
  • $result .= $content;
  • }
  • }
  • else
  • $result .= $content;
  • }
  • else
  • {
  • throw new Exception("Non autorise repeat. Please check the parameters.");
  • return;
  • }
  • if($echo)
  • {
  • echo $result;
  • $this->content = "";
  • }
  • else
  • {
  • return $result;
  • }
  • }
  • /**
  • *@param function:modifyAdnAdd modify all the occurence of the oldContent with the new content;
  • *
  • *@param string or array:$oldContent all the old content to change
  • *@param string or array:$newContent all the new content that replace the old content;
  • */
  • public function modifyAndAdd($oldContent,$newContent)
  • {
  • if(!is_array($oldContent))
  • {
  • $this->content = preg_replace("#".$oldContent."#i",$newContent,$this->content);
  • }
  • else
  • {
  • for($i = 0; $i < count($oldContent); $i++)
  • {
  • $this->content = preg_replace("#".$oldContent[$i]."#i",$newContent[$i],$this->content);
  • }
  • }
  • return $this->content;
  • }
  • /**
  • *@param function:clear reset all the variables;
  • */
  • public function clear()
  • {
  • $this->content = "";
  • $this->openTag = array();
  • $this->openContent = array();
  • $this->addContent = array();
  • }
  • /*
  • *@param function:save save the content writing until now in the variable content
  • *
  • *param string:$name the name you want to save the content in ex: "select_country"
  • */
  • public function save($name)
  • {
  • if(!$name || !is_string($name))
  • {
  • throw new Exception("Please field a string name argument.");
  • return;
  • }
  • if(!$this->save[$name])
  • {
  • $this->save[$name] = $this->content;
  • }
  • else
  • {
  • throw new Exception("This name is already used.Please use a different string name argument.");
  • return;
  • }
  • }
  • /*
  • *@param function:write write a save content
  • *
  • *@param string:$name the name you saved the content in ex: "select_country"
  • *@param echo:$echo use echo else return
  • */
  • public function write($name,$echo = null)
  • {
  • if(!$name || !is_string($name))
  • {
  • throw new Exception("Please field a string name argument.");
  • return;
  • }
  • if($this->save[$name])
  • {
  • if($echo)
  • {
  • echo $this->save[$name];
  • return;
  • }
  • else
  • {
  • $this->content .= $this->save[$name];
  • return $this->content;
  • }
  • }
  • else
  • {
  • throw new Exception("You havn't saved content with this name.");
  • return;
  • }
  • }
  • }
  • ?>
<?php
/********************************/
/* AstroProduction */
/* Version 1.0 */
/* All Right Reserved */
/* 2009 */
/********************************/

class tags
{
	/*Variables:*/
	/*
	*@param string $content contain the openTag addTags and closeTag function result
	*This variable will be usable in extanded classes
	*We dont want that an instance modify this variables content so we use protected
	*@param string $openTag contain the openTag name help to close the same tag that was open
	*@param string $openContent if exist contain the content of the openTag function
	*will be use for modification or repeat
	*@param string $addContent contain the content of the add function
	*will be used for repeat or modify function.
	*@param array:$save save a portion of content. can get it later
	*/
	protected $content;
	protected $openTag = array();
	protected $openContent = array();
	protected $addContent = array();
	protected $save = array();

	/*Functions:*/
	/*
	*@param function:__construct destroy all variables content if there is
	*/
	public function __construct()
	{
		$this->content = "";
		$this->openTag = array();
		$this->openContent = array();
		$this->addContent = array();
		$this->save = array();
	}

	/*
	*@param function:__destruct destroy all variables content
	*/
	public function __destroy()
	{
		$this->content = "";
		$this->openTag = array();
		$this->openContent = array();
		$this->addContent = array();
		$this->save = array();
	}

	/*
	*@param function:openTag open a tag like table, optgroup...
	*
	*@param string $name name of the tag e.g: table, tr, select...
	*@optional param array $attributes the tag can get attributes x => y as x='y'...
	*@optional param string $attributes the tag can get attributes x='y'...
	*@optional param array $content e.g can be used for list <li>$content<ul><li>....
	*@optional param boolean $tagUnique if it is a unique tag like <br /> we have to close it with an antislash (for XHTML)...
	*@optional param echo $echo write the contenr and clear the openContent
	*if the tag will be close after the content you can use addTags function
	*/
	public function openTag($name,$attributes = null,$content = null,$tagUnique = null,$echo = null)
	{
		if($name && !is_string($name))
		{
			throw new Exception('open wrong name tag');
			return;
		}
		//memories the open tag for the close function
		if(!$tagUnique)
		{
			$this->openTag[$name] = $name;
		}
		
		$open = "<".$name;
		if($attributes)
		{
			$open .= " ";
			if(is_array($attributes))
			{
				foreach($attributes as $attrKey => $attrValue)
				{
					$open .= $attrKey."='".$attrValue."' ";
				}
			}
			else
			{
				$open .= $attributes;
			}
		}
		if($tagUnique)
		{
			$open .= $content ? "/>".$content : "/>";
		}
		else
		{
			$open .= $content ? ">".$content : ">";
		}
		$this->content .= $open;
		
		//memories the content for duplicate or modify
		$this->openContent[$open] = $open;
		if($echo)
		{
			echo $this->content;
			$this->content = "";
		}
		else
		{
			return $this->content;
		}
	}

	/*
	*@param function:closeTag close the tag opened with openTag function
	*
	*@param string $number number of tags to close
	*/
	public function closeTag($number = null)
	{
		if(!$number)
			$number = 1;
		if($number && is_numeric($number))
		{
			for($i = 0; $i < $number; $i++)
			{
				$closeTag = array_pop($this->openTag);
				$close = "</".$closeTag.">";
				$this->content .= $close;
			}
		}
		return $this->content;
	}

	/*
	*@param function:addTags add a tag with open content close
	*
	*@param string:$name name of the tag;
	*@param string $content the content to put between the tags
	*@optional param array $attrTag attributes that the tag can get attributes x => y as x='y'
	*@optional param string $attrTag the tag can get attributes x='y'...
	*@optional param echo $echo write the contenr and clear the addContent
	*/
	public function addTags($name,$content,$attrTag = null,$echo = null)
	{
		if($name && !is_string($name))
		{
			throw new Exception('add wrong name tag');
			return;
		}
		
		$tags = "<".$name;
		if($attrTag)
		{
			$tags .= " ";
			if(is_array($attrTag))
			{
				foreach($attrTag as $tagKey => $tagValue)
				{
					$tags .= $tagKey."='".$tagValue."' ";
				}
			}
		}
		else
		{
			$tags .= $attrTag;
		}
		$tags .= ">".$content."</".$name.">";
		$this->content .= $tags;
		
		//memories the content for duplicate or modify
		$this->addContent[$tags] = $tags; 
		
		if($echo)
		{
			echo $this->content;
			$this->addContent = "";
		}
		else
		{
			return $this->content;
		}
	}

	/*
	*@param function:create print the $content variable and reset all variables
	*/
	public function create()
	{
		$create = $this->content;
		return $create;
	}
	
	/**
	*@param function:repeatTag repeat first last or all of the tags write before;
	*
	*@param string:$name type to repeat, can take firstO, firstA, lastO, O, A, and lastA values
	*O for openTag and A for Add tag if $name null repeat all the tags.
	*@param integer:$number number of repetition of the tags null repeat once.
	*@param integer:$int tag number n to be repeated works only when name == A for add or O for open
	*@optional param echo $echo write the contenr and clear the openContent and addContent
	*/
	public function repeatTag($name = null,$number = null,$int = null,$echo = null)
	{
		$result = "";
		if($name && !is_string($name))
			throw new Exception("Invalid name");
		if($number && !is_numeric($number))
			throw new Exception("Invalid number");
		if($name && is_string($name))
		{
			if($name === "firstO")
			{
				$content = array_shift($this->openContent);
				if($number && is_numeric($number))
				{
					for($n = 0; $n < $number; $n++)
					{
						$result .= $content;
					}
				}
				else
					$result = $content;
			}
			elseif($name == "firstA")
			{
				$content = array_shift($this->addContent);
				if($number && is_numeric($number))
				{
					for($n = 0; $n < $number; $n++)
					{
						$result .= $content;
					}
				}
				else	
					$result = $content;
			}
			elseif($name == "lastO")
			{
				$content = array_pop($this->openContent);
				if($number && is_numeric($number))
				{
					for($n = 0; $n < $number; $n++)
					{
						$result .= $content;
					}
				}
				else
					$result = $content;
			}
			elseif($name == "lastA")
			{
				$content = array_pop($this->addContent);
				if($number && is_numeric($number))
				{
					for($n = 0; $n < $number; $n++)
					{
						$result .= $content;
					}
				}
				else
					$result = $content;
			}
			elseif($name == "O")
			{
				if($int && is_int($int))
				{
					for($n = 0; $n < $int; $n++)
					{
						$content = array_shift($this->openContent);
					}
				}
				if($number && is_int($number))
				{
					for($n = 0; $n < $number; $n++)
					{
						$result .= $content;
					}
				}
				else
					$result .= $content;
			}
			elseif($name == "A")
			{
				if($int && is_int($int))
				{
					for($n = 0; $n < $int; $n++)
					{
						$content = array_shift($this->addContent);
					}
				}
				if($number && is_int($number))
				{
					for($n = 0; $n < $number; $n++)
					{
						$result .= $content;
					}
				}
				else
					$result .= $content;
			}
		}
		elseif(!$name)
		{
			$content = $this->content;
			if($number && is_numeric($number))
			{
				for($n = 0; $n < $number; $n++)
				{
					$result .= $content;
				}
			}
			else
				$result .= $content;
		}
		else
		{
			throw new Exception("Non autorise repeat. Please check the parameters.");
			return;
		}
		if($echo)
		{
			echo $result;
			$this->content = "";
		}
		else
		{
			return $result;
		}
	}
	
	/**
	*@param function:modifyAdnAdd modify all the occurence of the oldContent with the new content;
	*
	*@param string or array:$oldContent all the old content to change
	*@param string or array:$newContent all the new content that replace the old content;
	*/
	public function modifyAndAdd($oldContent,$newContent)
	{
		if(!is_array($oldContent))
		{
			$this->content = preg_replace("#".$oldContent."#i",$newContent,$this->content);
		}
		else
		{
			for($i = 0; $i < count($oldContent); $i++)
			{
				$this->content = preg_replace("#".$oldContent[$i]."#i",$newContent[$i],$this->content); 
			}
		}
		return $this->content;
	}
	
	/**
	*@param function:clear reset all the variables;
	*/
	public function clear()
	{
		$this->content = "";
		$this->openTag = array();
		$this->openContent = array();
		$this->addContent = array();
	}
	
	/*
	*@param function:save save the content writing until now in the variable content
	*
	*param string:$name the name you want to save the content in ex: "select_country"
	*/
	public function save($name)
	{
		if(!$name || !is_string($name))
		{
			throw new Exception("Please field a string name argument.");
			return;
		}
		if(!$this->save[$name])
		{
			$this->save[$name] = $this->content;
		}
		else
		{
			throw new Exception("This name is already used.Please use a different string name argument.");
			return;
		}
	}
	
	/*
	*@param function:write write a save content
	*
	*@param string:$name the name you saved the content in ex: "select_country"
	*@param echo:$echo use echo else return
	*/
	public function write($name,$echo = null)
	{
		if(!$name || !is_string($name))
		{
			throw new Exception("Please field a string name argument.");
			return;
		}
		if($this->save[$name])
		{
			if($echo)
			{
				echo $this->save[$name];
				return;
			}
			else
			{
				$this->content .= $this->save[$name];
				return $this->content;
			}
		}
		else
		{
			throw new Exception("You havn't saved content with this name.");
			return;
		}
	}
}
?>

 Conclusion

Petite modification de derniere minutes closeTag sans nom du tag comme parametre et nombre de tag a fermer en parametre optionel
ci join un exemple tableau sur 2 lignes.

La function repeatTag peut s'averer tres utile lorsque l'on veut recopier un tableau de 50 lignes creer par les autres function.

La function modifyAndAdd va ecraser toutes les occurences du text donner, pratique si on veut reprendre un dropdown en ne modifiant que la 20eme valeur. Apres modification l'original n'est pas conserver et donc un repeat repeteras le content modifier
PS: il est possible de creer un conservateur en recopiant la variable content dans une autre variable et ainsi repeter l'original.

La function clear() efface tout simplement les donners contenu dans les variables.

 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !

Télécharger le zip


 Historique

05 août 2009 21:20:01 :
Erreur echo modifie en erreur throw
06 août 2009 12:57:42 :
Ajout de trois nouvelles function clear, repeatTag and modifyAndAdd (mise a jour du zip avec nouvel exemple)
26 août 2009 16:49:47 :
ajout de l'option tagUnique dans la function openTag permettant de fermer le tag avec un antislash par exemple <br />. C'est pour en etre correct avec le XHTML.
28 août 2009 08:42:12 :
-changement du systeme interieur de la function closeTag (l'utilisation reste la meme) -rajout de l'option echo vidant le content apres utilisation (aide a creer un formulaire par exemple) dans les fonction openTag addTags et repeatTag -rajout de la valeur null de la variable $result dans la fonction repeatTag -nouvelle exemple dans le zip et disparition de l'ancien: creation d'un formulaire
28 août 2009 11:37:37 :
-rajout des function save() and write() et de la variable $save
28 août 2009 11:56:21 :
-modification du return dans la fonction write()

 Sources du même auteur

Source avec Zip FUNCTION LINK
Source avec Zip FUNCTION IMAGE SIMPLE ET ARRAY

 Sources de la même categorie

Source avec Zip GÉNÉRATION AUTOMATIQUE DE FICHIER .CLASS.PHP EN FONCTION D'U... par ig3
CLASSE D'OBJET DE CRYPTAGE ET DÉCRYPTAGE DE CHAINES DE CARAC... par 8Tnerolf8
Source avec Zip MY.DEVIANTART API par inwebo
CLASSE DE GESTION DE "VARIABLES GLOBALES D'ENVIRONNEMENT" par pifou25
Source avec Zip COLLECTION.CLASS.MIN.PHP par thunderhunter

 Sources en rapport avec celle ci

MANIPULATION DES DONNÉES IPTC par shevabam
FONCTIONS DE BASE POUR GÉNÉRER DU XML EN PHP par wipfire
UN SCANNER DE PORTS par coucou747

Commentaires et avis

Commentaire de dorian91 le 05/08/2009 19:13:13

Salut
Plutôt que d'utiliser des echo pour les messages d'erreurs tu devrais regarder les Exceptions (cf lien : http://fr.php.net/manual/fr/language.exceptions.php)

Commentaire de astro53 le 05/08/2009 21:21:25

Salut Dorian91,
Merci pour ton conseil j ai modifier la source pas le zip.
A bientot
Astro

Commentaire de idpro le 28/08/2009 04:16:26

Bonjour,

Dans la fonction repeatTag(..) que vaut la variable $result avant les boucles?

Merci.

Commentaire de astro53 le 28/08/2009 08:44:46

Salut idpro
C'est une bonne remarque, en fait elle ne contient rien a la base
Je viens de rajouter son vidage au debut de l'utilisation de repeatTag et d'autres element
A bientot
Astro

 Ajouter un commentaire


Discussions en rapport avec ce code source dans le forum

Lien hypertexte [ par luxpo ] Salut,Explication de mon petit problème :- J'ai une page1 où ya 2 liensEn cliquant sur le lien1 ya un popup qui s'ouvreEt j'aimerais bien que le lien aide pour creation de gestion de divx [ par karen ] bonjour a tous j'essai de cree en vain un script me permettant de gere mes divxen fait je veut faire ceciune partie administration avec pass (ca j'ai help! [ par LeRoux ] Je ne suis pas un pro. de PHP, mais j'aimerais savoir comment ouvrir, dans une page html, un id que le n'on connait pas auparavent: j'ai une feuille d fread d''un fichier XL ajoute des [] [ par jlfm ] J'utilise le code suivant pour downloader un fichier texte et forcer le lancement d'XL (suffixe XLS).Le fichier ouvert sous XL porte le nom test[n].xl fermer une session... [ par FleX ] bah voilag un site ou j'utilise les sessions pour transmettre les variables ,c vâchement + pratique Mais quand, l'utilisateur, vuet la fermer ya 2 sol Pb creation lien en fct boucle [ par Manson ] Bonjour a tous,voila j'ai un p'tit pb, j'ai fais un code en php me permettant de lister les fichiers JPG contenus dans un rep et j'affiche les noms de Creation d'un moteur de recherche [ par Coundelitch ] bonjour !Je dois créer un moteur de recherche en PHP. Ce moteur cherchera dans un dossier des fichiers au format HTML.C'est peut-etre simple mais le p Nom d'une table MySQL [ par QuarX ] Est-il possible de créer une table MySQL possédant un nom provenant d'une variable php? Par exemple:$nom = "Nom";$creation = "CREATE TABLE $nom(...)"; ouvre page de code [ par DarkSchneider ] Salut tout le monde,Une chose que je comprend pas du tout vient de me tomber sur le coin du nez.Quand je travaille en local, lors de l'affichage d'une creation de tables tables SQL [ par alexlord ] dans le mode d'emploi d'un forum c'est de creer des tables SQL a l'aide du fichier creation_tables.sql j'ai easy php et y'a un dossier my sql comment


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

Photothèque

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,421 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales