2013-06-23 1 views
0

Permettez-moi de me présenter en tant que débutant en php. J'ai une exigence pour jouer wmv dans un fichier php.Lecture de wmv en php - écran vide affiché dans le navigateur

J'essaye de lire un fichier wmv en PHP en utilisant le code suivant. Mais le navigateur affiche une page blanche vierge.

Je ne comprends pas pourquoi cela ne fonctionne pas. Toute aide est très appréciée.

<?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); 
?> 

Répondre

0

est ici un exemple de code HTML pour la lecture de vidéos WMV:

<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> 
Questions connexes