|
|
|
php+mysql+jw player ต้องแก้ไขเพิ่มเติมส่วนไหนครับ เวลาจะดึงข้อมูลออกมาแสดง.. |
|
|
|
|
|
|
|
ต้องแก้ไขเพิ่มเติมส่วนไหนครับ เวลาจะดึงข้อมูลออกมาแสดง..
สมมุติว่ามีหลายรายการ อยากให้แสดงทั้งหมดเลย..
อ้างถึง >> https://www.thaicreate.com/community/php-upload-vdo-clip-jw-player.html
Code (PHP)
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
$strSQL = "SELECT * FROM files WHERE FilesID = '".$_GET["FilesID"]."' ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult = mysql_fetch_array($objQuery);
?>
<h1> <?=$objResult["FilesName"];?></h1>
Size <?=number_format($objResult["Size"]/1024/1024,2);?> Mb.
<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("player.swf","mediaplayer","500","500","8");
s1.addParam('allowscriptaccess','always');
s1.addParam("allowfullscreen","true");
s1.addVariable("file","vdo/<?=$objResult["FilesName"];?>");
s1.addVariable('displayheight','240');
s1.addVariable('autoscroll','true');
s1.write("container");
</script>
<?
mysql_close($objConnect);
?>
ให้แสดงออกมาดังรูปนี้ครับ..
Tag : PHP, MySQL, JavaScript
|
|
|
|
|
|
Date :
2012-10-26 02:49:32 |
By :
virus2008 |
View :
1213 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ทำเป็น Loop ครับ
|
|
|
|
|
Date :
2012-10-26 09:27:32 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
จัดให้ครับ
Code (PHP)
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
$strSQL = "SELECT * FROM files WHERE FilesID = '".$_GET["FilesID"]."' ";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
while($objResult = mysql_fetch_array($objQuery))
{
?>
<h1> <?=$objResult["FilesName"];?></h1>
Size <?=number_format($objResult["Size"]/1024/1024,2);?> Mb.
<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("player.swf","mediaplayer","500","500","8");
s1.addParam('allowscriptaccess','always');
s1.addParam("allowfullscreen","true");
s1.addVariable("file","vdo/<?=$objResult["FilesName"];?>");
s1.addVariable('displayheight','240');
s1.addVariable('autoscroll','true');
s1.write("container");
</script>
<?
}
mysql_close($objConnect);
?>
|
|
|
|
|
Date :
2012-10-26 09:28:15 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณ mr.win อย่างสูงครับ...
|
|
|
|
|
Date :
2012-10-26 15:38:53 |
By :
virus2008 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|