2013-01-08 35 views
0

我想在本地IIS 7實例上安裝Flash應用程序。 SWF文件需要一個名爲lex.php的php文件才能正常工作。當在瀏覽器中運行swf時,它將返回錯誤「XML Load Failed」。當直接訪問PHP文件,它提供了以下錯誤:Flash和PHP的xml錯誤

Parse error: syntax error, unexpected 'version' (T_STRING) in C:\inetpub\wwwroot\lex.php on line 1 

的PHP文件有一個XML標記,刪除時,允許它才能正常工作。即使PHP文件在刪除XML標記時工作,SWF仍然不起作用。我嘗試了所有可以找到的建議,例如更正權限,添加SWF MIME類型以及爲PHP創建處理程序映射。我沒有太多配置IIS的經驗,所以我希望這是一個簡單的解決方案。感謝您的任何幫助

<?xml version='1.0' encoding="utf-16"?><!-- generated by Visuwords(TM) xml.php ... visuwords.com --><!-- (c) 2007 dunnbypaul.net --><lex><lemma><identity>grindle</identity><associations><node index='1'><type>-</type><link>1:02639087</link><ss_type>1</ss_type><lex_filenum>05</lex_filenum><lex_filename>noun.animal</lex_filename><lex_id>00</lex_id><head_word></head_word><head_id></head_id><synset_offset>02639087</synset_offset><sense_number>1</sense_number><tag_cnt>0</tag_cnt></node></associations></lemma><seconds_to_execute>0.0056090354919434</seconds_to_execute></lex> 

回答

1

謹防short_open_tag配置設置。

默認情況下此設置爲1(計算結果爲TRUE),其中,根據PHP的文件,將通過一個XML聲明打破:

If you want to use PHP in combination with XML, you can disable this option in order to use

<?xml ?>

inline. Otherwise, you can print it with PHP, for example:

<?php echo '<?xml version="1.0"?>'; ?> .

+0

良好的漁獲!這有幫助。 – MrUpsidown