Jump to content

syntax error with embede video player


s4salman

Recommended Posts

hi

i am getting syntax error in the following php code. Can any one help me in this regard.

 

 

<?php

echo "<script type=\"text/javascript\" src=\"http://funxy.com/sabaadmin/swfobject.js\"></script>




<script type=\"text/javascript\">



var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7");



s1.addParam("allowfullscreen","true");



s1.addVariable("file","$player");



s1.addVariable("image","$image");



s1.addVariable("width","320");



s1.addVariable("height","280");



s1.write("player1");



</script>";

?>

Link to comment
Share on other sites

What is the error?

 

EDIT: I can tell you right now this line is syntactically incorrect.  Your quotes are mixed up.

var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7");

Link to comment
Share on other sites

thank you for your reply , this is the error :

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/funxy/public_html/salmobile.info/3gp-videos-download2.php on line 233

 

i am attaching the php file.

 

[attachment deleted by admin]

Link to comment
Share on other sites

your gonna have to escape the quotes all the way through that, else change echo " to echo ' and get rid of the first escapes. line 224 and 233.

 

or just replace lines 222 to 263 with this:

 

<?php
echo '<script type="text/javascript" src="http://funxy.com/sabaadmin/swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7");
s1.addParam("allowfullscreen","true");
s1.addVariable("file","$player");
s1.addVariable("image","$image");
s1.addVariable("width","320");
s1.addVariable("height","280");
s1.write("player1");
</script>';
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.