Jump to content


Photo

Error


  • Please log in to reply
2 replies to this topic

#1 JustFriend

JustFriend

    Newbie

  • New Members
  • Pip
  • 5 posts

Posted 24 August 2013 - 01:25 PM

I want to make a Facebook Like Box and some After setting it on your index.php or game.php threw me an error that looks like this:

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/manoww/domains/manowwe.us.lt/public_html/index.php on line 282

 

FaceBook Like Box: <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fmanowwe&amp;width=300&amp;height=590&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=true&amp;show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:590px;" allowTransparency="true"></iframe>

 

<b>Could you explain where the error?<b>



#2 priyankagound

priyankagound

    Advanced Member

  • Members
  • PipPipPip
  • 59 posts

Posted 12 September 2013 - 06:56 AM

Syntax highlighting already shows you what's wrong. You need to use double quotes inside the string or escape the single quotes with a backslash.

When echoing code it's a good idea to use the heredoc quote syntax; you do not have to escape any quotes inside such a string:

echo <<<EOF
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.fromElement('modalLink1');
});
</script>
EOF;

Another solution would be simply ending the PHP mode:

?>
<script type="text/javascript">
window.addEvent('domready', function() {
SqueezeBox.fromElement('modalLink1');
});
</script>
<?php



#3 Maq

Maq

    Advanced Member

  • Moderators
  • 9,315 posts
  • LocationPennsylvania, USA

Posted 12 September 2013 - 02:30 PM

We need to see some code.


Electronic Cigarette Reviews - Smoking alternatives, find YOUR ecig! | tjmothy
ini_set ("display_errors", "1");
error_reporting(E_ALL);




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com