0

让我介绍一下自己是 php 的新手。我需要在 php 文件中播放 wmv。

我尝试使用以下代码在 php 中播放 wmv 文件。但是浏览器显示一个空白页面。

我不明白为什么这不起作用。任何帮助深表感谢。

<?php
$p="<html>\n
<head>\n
<title>My Windows media video webpage file written with PHP</title>\n
</head>\n
<body>\n
<BR>\n
<center><div>Windows media video webpage file written by a PHP page. How do you like it?<BR>\n
<object id=\"MediaPlayer\" classid=\"clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95\"   width=\"480\" height=\"406\" standby=\"Loading Windows Media Player components…\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls  /mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\">
<param name=\"FileName\" value=\"ez-architect.wmv\">
<param name=\"AutoStart\" value=\"true\">
<param name=\"ShowControls\" value=\"true\">
<param name=\"BufferingTime\" value=\"2\">
<param name=\"ShowStatusBar\" value=\"true\">
<param name=\"AutoSize\" value=\"true\">
<param name=\"InvokeURLs\" value=\"false\">
<param name=\"AnimationatStart\" value=\"1\">
<param name=\"TransparentatStart\" value=\"1\">
<param name=\"Loop\" value=\"0\">
<embed type=\"application/x-mplayer2\" src=\"ez-architect.wmv\" name=\"MediaPlayer\"  autostart=\"1\" showstatusbar=\"1\" showdisplay=\"1\" showcontrols=\"1\" loop=\"0\" videoborder3d=\"0\" pluginspage=\"http://www.microsoft.com/Windows/MediaPlayer/\"     width=\"480\" height=\"406\"></embed>
</object>
</div></center>\n
</body>\n
</html>\n";
$a = fopen("my_Windows_media_video_webpage_file_written_with_php.html", 'w');
fwrite($a, $p);
fclose($a);
chmod("my_Windows_media_video_webpage_file_written_with_php.html", 0644);
?>
4

1 回答 1

0

这是播放 WMV 视频的示例 HTML 代码:

<object id="mp3" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="240"
type="application/x-oleobject" width="320">
<PARAM NAME="URL" VALUE="sunpeek2.wmv">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="False" />
<PARAM NAME="AutoStart" VALUE="False" />
<PARAM name="uiMode" value="mini" />
</object>
于 2013-06-23T21:13:17.610 回答