<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[lesCigales.ORG - Hébergement gratuit sans publicité - [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
		<link>https://forum.lescigales.org/topic612-cloture-par-gilledunord-envoi-de-3-fichier-par-formulaire.html</link>
		<atom:link href="https://forum.lescigales.org/feed-rss-topic612.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[Messages les plus récents de [cloturé par gilledunord] Envoi de 3 fichier par formulaire.]]></description>
		<lastBuildDate>Fri, 30 Oct 2009 08:13:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3357.html#p3357</link>
			<description><![CDATA[<p>Non je n&#039;ai jamais essayé. Mais avec le script que j&#039;ai mis plus haut. Dans le Foreach, au lieu de copier dans un dossier, tu envoies un mail. Ou si tu veux tout dans le même mail. Tu ajoutes des fichiers dans le mails à chaque boucle de foreach et tu l&#039;envoies. J&#039;ai jamais envoyé de pieces jointes en php. je ne peux pas trop t&#039;aider. Mais je pense que tu ne doit pas en etre loin</p>]]></description>
			<author><![CDATA[null@example.com (Madmax)]]></author>
			<pubDate>Fri, 30 Oct 2009 08:13:29 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3357.html#p3357</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3356.html#p3356</link>
			<description><![CDATA[<p>Bonjour</p><p>Merci à tous pour vos soutiens...</p><p>Me suis peut être mal exprimé...<br />Je ne veux pas que les fichiers soit mis dans un répertoire, ni ne veux pas être obligeais de venir les chercher sur mon site.</p><p>Simplement les recevoirs dans ma boite mail, et c&#039;est la que ça coince...</p><p>Dans mon premier message ou j&#039;ai mis le script, sur les 3 envoi de fichier, j&#039;en reçois un seul dans ma boite et les deux autres sont envoyé dans le répertoire qui contient le script.</p><p>Je voudrais recevoir les 3 dans ma boite.</p><p>J&#039;ai essayer beaucoup de scripts dont ceux des sites que vous proposez mais ils envoient dans un répertoire et je n&#039;en veux pas !</p><p>Avez vous essayer vous même d&#039;envoyer 2 ou 3&nbsp; fichiers dans votre boite ?</p>]]></description>
			<author><![CDATA[null@example.com (gilledunord)]]></author>
			<pubDate>Fri, 30 Oct 2009 07:00:32 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3356.html#p3356</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3331.html#p3331</link>
			<description><![CDATA[<p>Salut,</p><p>J&#039;ai trouvé ceci : <a href="http://www.miasmatech.net/scripts/upload/upload.php">Upload</a></p><p>Voir le tutoriel : <a href="http://www.miasmatech.net/scripts/article/article_content.php?article_id=2">Gestionnaire d&#039;upload de fichier en PHP</a></p><p>Je n&#039;ai pas testé mais ce script me semble très intéressant...</p>]]></description>
			<author><![CDATA[null@example.com (Eric2A)]]></author>
			<pubDate>Mon, 19 Oct 2009 22:04:37 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3331.html#p3331</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3324.html#p3324</link>
			<description><![CDATA[<p>Ah ouais pas mal le [ code=php ].<br />C&#039;est vrai que c&#039;est un gros coup de pouces, mais je le sentait prêt à abandonner. C&#039;était pour le relancer.</p>]]></description>
			<author><![CDATA[null@example.com (Madmax)]]></author>
			<pubDate>Fri, 16 Oct 2009 07:37:53 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3324.html#p3324</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3323.html#p3323</link>
			<description><![CDATA[<p>N&#039;oubliez pas d&#039;utiliser [ code=php ] pour highlighter votre code php <img src="https://forum.lescigales.org/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Sinon Madmax, je pense que tu as trop mâché le travail <img src="https://forum.lescigales.org/img/smilies/smile.png" width="15" height="15" alt="smile" /> Et c&#039;est quoi ce message d&#039;Attaque potentielle ? <img src="https://forum.lescigales.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (toad)]]></author>
			<pubDate>Fri, 16 Oct 2009 05:23:40 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3323.html#p3323</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3321.html#p3321</link>
			<description><![CDATA[<p>Il ne faut pas s&#039;énerver, Toad t&#039;as donner les éléments nécessaires,&nbsp; Il faut juste chercher un peu. Tu verras si tu y arrives tu seras encore plus fière de toi, et tu auras appris plein de chose.<br />Ca rappel le proverbe. Donne du poisson à quelqu&#039;un, tu le nourriras une journée, apprend lui à pêcher tu le nourris pour la vie.<br />Foreach -&gt; <a href="http://fr2.php.net/manual/fr/control-structures.foreach.php">http://fr2.php.net/manual/fr/control-st … oreach.php</a><br />$_FILES -&gt; <a href="http://fr.php.net/manual/fr/features.file-upload.post-method.php">http://fr.php.net/manual/fr/features.fi … method.php</a></p><p>Ce qui donne vite fait: <br /></p><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$uploaddir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/var/www/uploads/'</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />&nbsp; <span style="color: #000088;">$uploadfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uploaddir</span> <span style="color: #339933;">.</span> <a href="http://www.php.net/basename"><span style="color: #990000;">basename</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />&nbsp;<br />&nbsp; <a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'&lt;pre&gt;'</span><span style="color: #339933;">;</span><br />&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/move_uploaded_file"><span style="color: #990000;">move_uploaded_file</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'userfile'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uploadfile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">&quot;Le fichier est valide, et a été téléchargé<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;avec succès. Voici plus d'informations :<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />&nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">&quot;Attaque potentielle par téléchargement de fichiers.<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Voici plus d'informations :<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />&nbsp; <span style="color: #009900;">&#125;</span><br />&nbsp;<br />&nbsp; <a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'Voici quelques informations de débogage :'</span><span style="color: #339933;">;</span><br />&nbsp; <a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />&nbsp;<br />&nbsp; <a href="http://www.php.net/echo"><span style="color: #990000;">echo</span></a> <span style="color: #0000ff;">'&lt;/pre&gt;'</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span></pre></div><p>Y&#039;a plus qu&#039;a adapter. Je te conseille vivement de lire le phpManual il est super bien fait et presque agréable à lire. Si tout les manuels de langage étaient comme lui, l&#039;informatique serait simple.</p>]]></description>
			<author><![CDATA[null@example.com (Madmax)]]></author>
			<pubDate>Thu, 15 Oct 2009 17:53:06 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3321.html#p3321</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3316.html#p3316</link>
			<description><![CDATA[<p>Bonjour toad</p><p>Une chose qu&#039;il faut savoir, quand on se dit novice (je parle de moi) cela veut dire novice.</p><p>Donc je m&#039;arréte là...</p>]]></description>
			<author><![CDATA[null@example.com (gilledunord)]]></author>
			<pubDate>Wed, 14 Oct 2009 12:05:32 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3316.html#p3316</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3310.html#p3310</link>
			<description><![CDATA[<p>Honnêtement la seule aide dont tu es besoin est celle ci:<br />1/ apprends à découvrir la variable globale $_FILES (fais un echo &#039;&lt;pre&gt;&#039;, print_r($_FILES, true),&#039;&lt;/pre&gt;&#039;; si besoin)<br />2/ regarde du coté de foreach pour faire une boucle sur les différents éléments de $_FILES (http://sk.php.net/foreach peut être)</p>]]></description>
			<author><![CDATA[null@example.com (toad)]]></author>
			<pubDate>Tue, 13 Oct 2009 00:55:43 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3310.html#p3310</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3306.html#p3306</link>
			<description><![CDATA[<p>Bonjour toad</p><p>Le code php je l&#039;ai en fait bidouillé avec des morceaux que j&#039;ai trouvés.<br />J&#039;ai fait plusieurs forums et ai trouvé divers codes mais aucun ne fonctionne, que se soit en local avec WampServer2 ou en ligne.</p><p>Sur le &quot;siteduzéro&quot; il présente un formulaire que pour un fichier, en disant que l&#039;on peut ajouter autant de &lt;input type=&quot;file&quot; que l&#039;on voulait, oui mais comment ?</p><p>J&#039;avais une idée simple s&#039;est de doublé le script mais le problème s&#039;est que ça envoi en 2 fois mais séparément, alors que je voudrais les données du formulaire avec les deux fichiers envoyés, et ça dans ma boite, pas dans un répertoire.</p><p>N&#039;aurait tu pas un script pour au moins envoyer deux fichiers ? </p><p>Merci pour ton aide</p>]]></description>
			<author><![CDATA[null@example.com (gilledunord)]]></author>
			<pubDate>Mon, 12 Oct 2009 08:36:46 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3306.html#p3306</guid>
		</item>
		<item>
			<title><![CDATA[Re: [cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3305.html#p3305</link>
			<description><![CDATA[<p>Bonsoir,</p><p>Je ne comprends pas comment tu veux gérer 3 fichiers différents quand ton code ne travaille que sur 1 fichier (aucune boucle ou moyen de lire les différents fichiers uploadés via $_FILES).</p><p>D&#039;autres parties du code m&#039;épatent aussi:<br /></p><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$type</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/plain&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;doc&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span></pre></div>]]></description>
			<author><![CDATA[null@example.com (toad)]]></author>
			<pubDate>Sun, 11 Oct 2009 23:03:29 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3305.html#p3305</guid>
		</item>
		<item>
			<title><![CDATA[[cloturé par gilledunord] Envoi de 3 fichier par formulaire]]></title>
			<link>https://forum.lescigales.org/post3304.html#p3304</link>
			<description><![CDATA[<p>Bonjour</p><p>Depuis un formulaire j&#039;essaye d&#039;envoyé 3 fichiers pour les recevoir dans ma boite mail mais je n&#039;en reçois qu&#039;un.<br />Quelqu&#039;un peut t-il m&#039;aider ?</p><p>Le formulaire :<br /></p><div class="codebox"><pre class="html" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">form</span></a> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;POST&quot;</span> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mail.php&quot;</span> <span style="color: #000066;">enctype</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;multipart/form-data&quot;</span>&gt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier&quot;</span>&gt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier&quot;</span>&gt;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier&quot;</span>&gt;</span><br /><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;envoyer&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Poster&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span><br /><span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">form</span></a>&gt;</span></pre></div><p>le fichier php :<br /></p><div class="codebox"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />&nbsp;<br /><span style="color: #000088;">$name_file</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fichier'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br /><span style="color: #000088;">$source</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_FILES</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'fichier'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'tmp_name'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><a href="http://www.php.net/move_uploaded_file"><span style="color: #990000;">move_uploaded_file</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$source</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;./&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$name_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />&nbsp;<br /><span style="color: #000088;">$extension</span><span style="color: #339933;">=</span>get_extension<span style="color: #009900;">&#40;</span><span style="color: #000088;">$name_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />&nbsp;<br /><span style="color: #000088;">$type</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/plain&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;doc&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$type</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/vnd.ms-word&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br /><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;xls&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$type</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;text/vnd.ms-excel&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br />&nbsp;<br /><span style="color: #000088;">$type2</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;image/png&quot;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extension</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;gif&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$type2</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;image/gif&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br /><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$extension</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;bmp&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$type2</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;image/bmp&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br />&nbsp;<br /><span style="color: #000000; font-weight: bold;">function</span> get_extension<span style="color: #009900;">&#40;</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$parts</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span><span style="color: #000088;">$filename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$last</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parts</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />&nbsp; &nbsp;<span style="color: #000088;">$ext</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$parts</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$last</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />&nbsp; &nbsp;<span style="color: #b1b100;">return</span> <span style="color: #000088;">$ext</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br />&nbsp;<br /><span style="color: #009900;">&#123;</span><br /><span style="color: #000088;">$boundary</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;-----=&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/md5"><span style="color: #990000;">md5</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/uniqid"><span style="color: #990000;">uniqid</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/rand"><span style="color: #990000;">rand</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$header</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$header</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: multipart/mixed; boundary=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$boundary</span><span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$header</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Je vous informe que ceci est un message au format MIME 1.0 multipart/mixed.<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--<span style="color: #006699; font-weight: bold;">$boundary</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: <span style="color: #006699; font-weight: bold;">$type</span>; charset=<span style="color: #000099; font-weight: bold;">\&quot;</span>iso-8859-1<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Transfer-Encoding:8bit<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;ici la page en htm&quot;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$name_file</span><span style="color: #339933;">!=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br /><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$name_file</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$fp</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;rb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>&nbsp; <br /><span style="color: #000088;">$attachment</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fread"><span style="color: #990000;">fread</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #339933;">,</span> <a href="http://www.php.net/filesize"><span style="color: #990000;">filesize</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /><a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$attachment</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/chunk_split"><span style="color: #990000;">chunk_split</span></a><span style="color: #009900;">&#40;</span><a href="http://www.php.net/base64_encode"><span style="color: #990000;">base64_encode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attachment</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />&nbsp;<br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--<span style="color: #006699; font-weight: bold;">$boundary</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Type: <span style="color: #006699; font-weight: bold;">$type2</span>; name=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$file</span><span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Transfer-Encoding: base64<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-Disposition: inline; filename=<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$file</span><span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$attachment</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$msg</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;--<span style="color: #006699; font-weight: bold;">$boundary</span>--<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br />&nbsp;<br /><span style="color: #000088;">$destinataire</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'monmail@sfr.fr'</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$expediteur</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Formulaire_de_mon_site'</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$sujet</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Mons site'</span><span style="color: #339933;">;</span><br /><span style="color: #000088;">$reponse</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$expediteur</span><span style="color: #339933;">;</span><br />&nbsp;<br /><a href="http://www.php.net/mail"><span style="color: #990000;">mail</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$destinataire</span><span style="color: #339933;">,</span><span style="color: #000088;">$sujet</span><span style="color: #339933;">,</span><span style="color: #000088;">$msg</span><span style="color: #339933;">,</span><br />&nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">&quot;Reply-to: <span style="color: #006699; font-weight: bold;">$reponse</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>From: <span style="color: #006699; font-weight: bold;">$expediteur</span><span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$header</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br />&nbsp;<br /><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$name_file</span><span style="color: #339933;">!=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><br /><span style="color: #009900;">&#123;</span><br /><a href="http://www.php.net/unlink"><span style="color: #990000;">unlink</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$name_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br /><span style="color: #009900;">&#125;</span><br />&nbsp;<br /><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div><p>mes essais :<br /></p><div class="codebox"><pre class="html" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />puis<br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier1&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier2&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier3&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />puis<br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier[]&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier[]&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier[]&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br />puis<br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier[1]&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier[2]&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span><br /> <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;fichier[3]&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div><p>Je n&#039;ai pas de déclaration d&#039;erreur et je ne reçois qu&#039;un seul fichier.<br />Regardé plusieurs forums qui indiquent de mettre la dernière version mais ça ne marche pas, ni en local avec WampServer2 ni sur un hébergeur.</p>]]></description>
			<author><![CDATA[null@example.com (gilledunord)]]></author>
			<pubDate>Sun, 11 Oct 2009 15:41:31 +0000</pubDate>
			<guid>https://forum.lescigales.org/post3304.html#p3304</guid>
		</item>
	</channel>
</rss>
