My web page is fine on my server, but my local copy gives a parser error
This question already has an answer here:
Most probably the combined use of normal and short open tag at the end of your document. Specifically this line:
<?php if(isset($_COOKIE['emailadd'])){ ?>
This line is opened with a normal tag. But the end of the if statement is not:
<? }?>
This causes PHP to conclude the document is not complete at the last line because it is still expecting a close tag from that if.
Short open tags are disabled by default on new installations. Presumably one installation has it enabled, and the other has not. Either enable short open tags in php.ini or replace them with normal open tags. At least using the same tag consistently will cause a more regular behavior.
Php codes will show errors because of too many things. Some of them may consider the version of PHP. If your PHP Program is latest PHP 5 or above, You must need to install that latest version of Wamp in your PC. Otherwise, it will show errors like this.
链接地址: http://www.djcxy.com/p/69552.html上一篇: 当不在双引号内时替换