Heim >Backend-Entwicklung >PHP-Tutorial >在线文档播放有关问题:播放器加载flash失败

在线文档播放有关问题:播放器加载flash失败

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:43:20972Durchsuche

在线文档播放问题:播放器加载flash失败
在网上找了phpcms百度文库插件(源程序就是phpcms的),照着做了下,转换都成功了,就是在显示的时候转换好的flash老是加载不出来(播放器正常加载),求解。
转换所用工具:OpenOffice3.0、Windows Resource Kit Tools和swftools。
先上显示页面代码:

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> {loop $docurl $r}<script type="text/javascript" src="/viewer/history/history.js"></script><script type="text/javascript" src="/viewer/swfobject.js"></script><script type="text/javascript">            var flashvars = {            SwfFile : escape("{$r[filename]}"),                  Scale : 0.6,                   ZoomTransition : "easeOut",                  ZoomTime : 0.5,                    ZoomInterval : 0.1,                    FitPageOnLoad : false,                    FitWidthOnLoad : true,                    PrintEnabled : true,                    FullScreenAsMaxWindow : false,                    ProgressiveLoading : true,                    PrintToolsVisible : true,                    ViewModeToolsVisible : true,                    ZoomToolsVisible : true,                    FullScreenVisible : true,                    NavToolsVisible : true,                    CursorToolsVisible : true,                    SearchToolsVisible : true                  };            var params = {};            var attributes = {};            params.quality = "high";            params.bgcolor = "#ffffff";            params.allowscriptaccess = "sameDomain";            params.allowfullscreen = "true";            attributes.id = "wenkuplays";            attributes.name = "wenkuplays";            swfobject.embedSWF("{APP_PATH}viewer/wenkuplays.swf","flashContent","700","550", "10.0.0","{APP_PATH}viewer/playerProductInstall.swf",flashvars,params,attributes);            swfobject.createCSS("#flashContent", "display:block;text-align:left;");        </script> <div id="flashContent"> <p>  本文档播放器要确保Adobe Flash Player版本10.0.0或更高版本。</p> <script type="text/javascript">     var pageHost = ((document.location.protocol == "https:") ? "https://" :    "http://");     document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"+ pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' />" ); </script> </div>{/loop}

网上找了一圈,有人说是下边这行错了,
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : escape("{$r[filename]}"),

应该改为:
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("{$r[filename]}"),

但我改完后还是加载不了swf,
还有说是swf文件名含中文或者是swf文件被放在文件夹下了,于是我在根目录下放了一个转换好的swf文件,并把上段代码改为:
PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("a.swf"),


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("/a.swf"),


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("{APP_PATH}/a.swf"),


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->SwfFile : decodeURI("{APP_PATH}a.swf"),
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:再请问一个正则表达式Nächster Artikel:正则报错,该如何处理