Probléme de guillemet

Fermé
ggh - 9 août 2013 à 10:14
 ggh - 9 août 2013 à 10:27
Bonjour,

J'écris un code d'envoi d'email automatique mais PHP bug avec une erreur de syntaxe.
Cela est du à des problèmes de guillemets car le contenu de mon message est dans une variable mais avec plein de guillemets.

je crois qu'il y a une astuce mais je ne me souviens plus

code :
     $message ='<html><head> <style type="text/css">
   body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{ margin:0; padding:0;}
table{ border-collapse:collapse; border-spacing:0;}
fieldset,img{ border:0;}
address,caption,cite,code,dfn,th,var{ font-style:normal; font-weight:normal;}
ol,ul{ list-style:none;}
caption,th{ text-align:left;}
h1,h2,h3,h4,h5,h6{ font-size:100%; font-weight:normal;}
q:before,q:after{ content:'';}
abbr,acronym{ border:0;}

html {
	overflow:-moz-scrollbars-vertical;
}
a{
	color:#333;
	text-decoration:underline;
}
form{
	background:#f7f7f7;
	background:-moz-linear-gradient(90deg, #ccc, #fff); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#ccc)); /* Webkit */
	border:1,5% solid #aaa;
	border-radius:10px;
	-webkit-border-radius:10px;
	box-shadow:0 0 15px #aaa;
	-webkit-box-shadow:0 0 15px #aaa;
	margin:1.7% auto 0;
	padding:20px;
	width:300px;
	opacity: 0.8;
  box-shadow: 8px 8px 12px #000000;
/* d d bn v1ss s sfs ss blablabla */
}

.header{
	background:#f7f7f7;
	background:-moz-linear-gradient(90deg, #ccc, #fff); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#ccc)); /* Webkit */
	border:1,5% solid #aaa;
	border-radius:10px;
	-webkit-border-radius:10px;
	box-shadow:0 0 15px #aaa;
	-webkit-box-shadow:0 0 15px #aaa;
	margin:1% auto 0;
	padding:40px;
	width:35%;
	opacity: 0.6;
  box-shadow: 16px 16px 24px #000000;
/* d d bn v1ss s sfs ss blablabla */
}

.footer{
	background:#f7f7f7;
	background:-moz-linear-gradient(90deg, #ccc, #fff); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#ccc)); /* Webkit */
	border:1,5% solid #aaa;
	border-radius:10px;
	-webkit-border-radius:10px;
	box-shadow:0 0 15px #aaa;
	-webkit-box-shadow:0 0 15px #aaa;
	margin:1.3% auto 0;
	padding:20px;
	width:65%;
	opacity: 0.6;
  box-shadow: 16px 16px 24px #000000;
/* d d bn v1ss s sfs ss blablabla */
}


h1{
	border-bottom:1px solid #ccc;
	font-size:11px;
	font-weight:bold;
	letter-spacing:2px;
	margin-bottom:20px;
	text-transform:uppercase;
}
form p{
	margin-bottom:20px;
}
form p:last-child{ /* Sélecteur avancé pour sélectionner le dernier paragraphe du formulaire */
	margin-bottom:0;
}
.label{
	font-family: Arial, Verdana; 
	text-shadow: 2px 2px 2px #ccc;
	display: block; 
	margin-left:2%;
	font-weight: bold; 
	text-align: center; 
	width: 160px; 
	line-height: 25px; 
	font-size: 18px;
}

.label_header{
	font-family: Arial, Verdana; 
	text-shadow: 2px 2px 2px #ccc;
	display: block; 
	font-weight: bold; 
	text-align: center; 
	width: auto; 
	line-height: 25px; 
	font-size: 35px;
text-shadow:13px 7px 3px #555555;
}

.lien{
	font-family: Arial, Verdana; 
	text-shadow: 2px 2px 2px #ccc;
	display: block; 
	font-weight: bold; 
	text-align: center; 
	width: auto; 
	line-height: 25px; 
	font-size: 22px;
text-shadow:13px 7px 3px #555555;
  line-height:0px;
}

.espace{
  line-height:0px;
}

.label_footer{
	font-family: Arial, Verdana; 
	text-shadow: 2px 2px 2px #ccc;
	display: block; 
	font-weight: bold; 
	text-align: center; 
	width: auto; 
	line-height: 25px; 
	font-size: 22px;
text-shadow:4px 4px 3px #555555;
}


form p:hover label{
	color:#0459b7;
}
form p:hover label:after{
	content:" »";
}
input[type=text],
input[type=password]{
margin-left:10%;	
background: rgba(255, 255, 255, 0.9);
	background:-moz-linear-gradient(90deg, #fff, #eee); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#eee), to(#fff), color-stop(0.2, #fff)); /* Webkit */
	border:1px solid #aaa;
	border-radius:3px;
	-webkit-border-radius:3px;
	box-shadow:0 0 3px #aaa;
	-webkit-box-shadow:0 0 3px #aaa;
	padding:5px;
}
input[type=text]:focus{;
background: rgba(255, 255, 255, 0.9);
	background:-linear-gradient(90deg, #fff, #eee); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#eee), to(#fff), color-stop(0.2, #fff)); /* Webkit */
	border:1px solid #aaa;
	border-radius:3px;
	-webkit-border-radius:3px;
	
border-color:#093c75;
box-shadow:0 0 3px #0459b7;
	-webkit-box-shadow:0 0 3px #0459b7;
	outline:none; 

}
input[type=password]:focus{
float:center;
	background:-linear-gradient(90deg, #fff, #eee); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#eee), to(#fff), color-stop(0.2, #fff)); /* Webkit */
	border:1px solid #aaa;
	border-radius:3px;
	-webkit-border-radius:3px;
	
border-color:#093c75;
box-shadow:0 0 3px #0459b7;
	-webkit-box-shadow:0 0 3px #0459b7;
	outline:none; 
	
}
select{
	cursor:pointer;
	padding:3px;
	box-shadow:0 0 3px #aaa;
	-webkit-box-shadow:0 0 3px #aaa;
}
select:active,
select:focus{
	border:1px solid #093c75;
	border-radius:3px;
	box-shadow:0 0 3px #0459b7;
	-webkit-box-shadow:0 0 3px #0459b7;
	outline:none;
}
input[type=submit],
a.submit{
	background:#ddd;
	background:-moz-linear-gradient(90deg, #0459b7, #08adff); /* Firefox */
	background:-webkit-gradient(linear, left top, left bottom, from(#08adff), to(#0459b7)); /* Webkit */
	border:1px solid #093c75;
	border-radius:3px;
	-webkit-border-radius:3px;
	box-shadow:0 1px 0 #fff;
	-webkit-box-shadow:0 1px 0 #fff;
	color:#fff;
	cursor:pointer;
	font-family:Arial,sans-serif;
	font-size:12px;
	font-weight:bold;
	margin-left:120px;
	padding:5px 10px;
	text-decoration:none;
	text-shadow:0 1px 1px #333;
	text-transform:uppercase;
}
input[type=submit]:hover,
a.submit:hover{
	background:#eee;
	background:-moz-linear-gradient(90deg, #067cd3, #0bcdff);
	background:-webkit-gradient(linear, left top, left bottom, from(#0bcdff), to(#067cd3));
	border-color:#093c75;
	text-decoration:none;
}
input[type=submit]:active,
input[type=submit]:focus,
a.submit:active,
a.submit:focus{
	background:#ccc;
	background:-moz-linear-gradient(90deg, #0bcdff, #067cd3);
	background:-webkit-gradient(linear, left top, left bottom, from(#067cd3), to(#0bcdff));
	border-color:#093c75;
	outline:none;
}
#options{
	margin-bottom:20px;
}
#options p{
	display:none;
}
#options .show{
	display:block;
}
#options:target .show{
	display:none;
}
#options .hide{
	display:none;
}
#options:target .hide{
	display:block;
}
#options:target p{
	display:block;
}
#finish{
	background:rgba(65, 166, 42, 0.2);
	border:2px solid #41a62a;
	border-radius:3px;
	-webkit-border-radius:3px;
	display:none;
	padding:5px 10px;
}
#finish:target{
	display:block;
}
input:-moz-placeholder {  
      color: ccc;  
    }
#opacity {opacity: 0.7}


   </style> <title>Un titre ici</title></head><body><div class="header"><div class="label_header">zddz<br /><br /><div class="lien">www.sddgzdaz.com</div></div></div>
</body></html>';

merci d'avance

2 réponses

Pierrecastor Messages postés 41466 Date d'inscription mercredi 5 novembre 2003 Statut Modérateur Dernière intervention 5 avril 2024 4 131
9 août 2013 à 10:24
Salut

T'as essayé avec des doubles ?
0
oui c'est pareil
0