i'm having issue with php / "" '' etc

Post Reply
Mysoogal
Captain
Captain
Posts: 223
Joined: Thu Dec 17, 2009 7:15 am
Location: Planet VPS

i'm having issue with php / "" '' etc

Post by Mysoogal » Fri Dec 25, 2009 12:30 pm

i'm trying to code a video streaming script based on videolan plugin, and ssh to do the backend ffmpeg,mencoder etc

i'm done so far a index.php which lists thumbnails and file url

but im stuck here

Code: Select all

<a href="#" onclick="vlc_controls.play('http://code.revolunet.com/VLCjs/rambo.mpg')">rambo trailer</a> 
my issue is how to enable the onclick vlc in this section of code

Code: Select all

echo "<div class=\"photo\"><a href=\"movies/$file.mkv\"><span></span><img src=\"data/$file\" alt=\"$file\" /></a>       </div> ";
i've tried to code it like this but doesnt work

Code: Select all

echo "<div class=\"photo\>]<a href=\"movies/$file.mkv\" onclick=\"vlc_controls.play(movies/$file.mkv)\">$file</a><span></span><img src=\"data/$file\" alt=\"$file\" /></a>       </div> ";

but its just gives me issues, im not sure how to put the \ into the vlc onclick :cry:

please advice me on this

thank you
Mysoogal
Captain
Captain
Posts: 223
Joined: Thu Dec 17, 2009 7:15 am
Location: Planet VPS

Re: i'm having issue with php / "" '' etc

Post by Mysoogal » Fri Dec 25, 2009 12:33 pm

Image
Mysoogal
Captain
Captain
Posts: 223
Joined: Thu Dec 17, 2009 7:15 am
Location: Planet VPS

Re: i'm having issue with php / "" '' etc

Post by Mysoogal » Fri Dec 25, 2009 1:57 pm

i got it to work after all lol took me such long time

Code: Select all



echo " <div class=\"photo\">
        <a href=\"#\" onclick=\"vlc_controls.play('http://89.238.172.210/movies/$file.mkv')\">
        <span>
        </span>
        <img src=\"data/$file\" alt=\"$file\" /> </a>
        </div> ";

 
Mysoogal
Captain
Captain
Posts: 223
Joined: Thu Dec 17, 2009 7:15 am
Location: Planet VPS

Re: i'm having issue with php / "" '' etc

Post by Mysoogal » Fri Dec 25, 2009 2:03 pm

does anybody know why that above code is not working on firefox ? :cry:

it works on IE8 and IE7 why not firefox ?
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Re: i'm having issue with php / "" '' etc

Post by Neo » Sun Dec 27, 2009 11:14 am

Hello! thought all are out for vacation :)

There are many differences between firefox and IE in parsing CSS files.
Fix CSS Div incompatibility in Firefox is added as an example.

In addition to that make sure when you use php for a css file you need to add the following at the top of the file:

Code: Select all

<?php header("Content-type: text/css"); ?>
Mysoogal
Captain
Captain
Posts: 223
Joined: Thu Dec 17, 2009 7:15 am
Location: Planet VPS

Re: i'm having issue with php / "" '' etc

Post by Mysoogal » Sun Dec 27, 2009 12:38 pm

thanks,top my menu had div and would overflow in ff.

thanks for fix :D
Post Reply

Return to “PHP & MySQL”