I make data.php in view folder like this
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashPlayer">
This text will be replaced by the flash music player.
</div>
<script type="text/javascript">
var so = new SWFObject("playerMultipleList.swf", "mymovie", "295", "200", "7", "#FFFFFF");
so.addVariable("autoPlay","yes")
so.addVariable("repeat","false")
so.addVariable("playlistPath","playlist.xml")
so.write("flashPlayer");
</script>`
and my trouble is, I put file swfobject.js, playerMultipleList.swf, playlist.xml on view folder too and when I run, system can't read all of that file.
have any solution ???
When you link file source like you did in your view it doesn't look for the files in view folder but root of your system. so you can create a folder at the root of your system(where application, system folders are, or basicaly where index.php is) and put your files there. then you can ink like in the below code. I assumed the folder name is "inc".
<script type="text/javascript" src="inc/swfobject.js"></script>
<div id="flashPlayer">
This text will be replaced by the flash music player.
</div>
<script type="text/javascript">
var so = new SWFObject("inc/playerMultipleList.swf", "mymovie", "295", "200", "7", "#FFFFFF");
so.addVariable("autoPlay","yes")
so.addVariable("repeat","false")
so.addVariable("playlistPath","playlist.xml")
so.write("flashPlayer");
</script>