2013-01-08 52 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