Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello :) i just wanned to try something in php, by the way it's the basic thing, "echo" , here is the code

HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

	echo "Ce script envoie un mail à " ;	
?>


</body>
</html>



when i run it with wampserver , i have this error
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

so please if someone could help me, thank you :)
Posted
Updated 14-Aug-11 19:03pm
v2

I tested this code — it works as expected.

I have only one question: The character 'à' needs Unicode. You correctly prescribed the charset in the file, but did you save your file in UTF-8 encoding? If you did it wrong, it would not cause this error message anyway. Check up: maybe the file you deployed and ran and the code in your question are different?

—SA
 
Share this answer
 
thanks for answering Smile | Smile | :)
but i tried a different message, like this


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<?php

echo "xxxxxxxxxxx" ;

?>

</body>
</html>


the error still the same unfortunatly ..
i even tried the simple cote < ' ' > , instead of < " " >
thanks for helping
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900