PHP幻灯片放映赢得';我不能在Internet Explorer上工作

PHP幻灯片放映赢得';我不能在Internet Explorer上工作,php,javascript,html,drupal,slideshow,Php,Javascript,Html,Drupal,Slideshow,我通过直接访问PHP“page.tpl.PHP”在Drupal站点的登录页上编辑了幻灯片,现在该站点无法在IE8上运行。它在Mozilla和Chrome上运行正常(允许鼠标悬停和幻灯片链接),但在Internet Explorer上出现故障。我只编辑了代码的一小部分,以允许使用基本的HTML标记,而不仅仅是幻灯片图像。我改变了这一点: <div class="slideshow"> <?php if($lang_n

我通过直接访问PHP“page.tpl.PHP”在Drupal站点的登录页上编辑了幻灯片,现在该站点无法在IE8上运行。它在Mozilla和Chrome上运行正常(允许鼠标悬停和幻灯片链接),但在Internet Explorer上出现故障。我只编辑了代码的一小部分,以允许使用基本的HTML标记,而不仅仅是幻灯片图像。我改变了这一点:

<div class="slideshow">
                <?php
                if($lang_name == "en"){
                ?>
                    <img src="<?php print $base_path . $directory; ?>/images/slideshows/ENGreplacementworkingoncomputer.png" width="950" height="355" alt="Legal Logik"/>
                    <img src="<?php print $base_path . $directory; ?>/images/slideshows/ENGreplacementhandshake.png" width="950" height="355" alt="Legal Logik"/>
                    <img src="<?php print $base_path . $directory; ?>/images/slideshows/ENGreplacementgirlstanding.png" width="950" height="355" alt="Legal Logik"/>
                <?php
                }else{
                ?>
                    <img src="<?php print $base_path . $directory; ?>/images/slideshows/FRreplacementworkingoncomputer.png" width="950" height="355" alt="Legal Logik"/>
                    <img src="<?php print $base_path . $directory; ?>/images/slideshows/FRreplacementhandshake.png" width="950" height="355" alt="Legal Logik"/>
                    <img src="<?php print $base_path . $directory; ?>/images/slideshows/FRreplacementgirlstanding.png" width="950" height="355" alt="Legal Logik"/>
                <?php
                }
                ?>  

/图像/幻灯片/ENGreplacementworkingoncomputer.png“width=“950”height=“355”alt=“Legal Logik”/
/图像/幻灯片/ENGreplacementhandshake.png“width=“950”height=“355”alt=“Legal Logik”/
/图像/幻灯片/ENGreplacementgirlstanding.png“width=“950”height=“355”alt=“Legal Logik”/
/图像/幻灯片/freplacementworkingoncomputer.png“width=“950”height=“355”alt=“Legal Logik”/
/图像/幻灯片/freplacementhandshake.png“width=“950”height=“355”alt=“Legal Logik”/
/图像/幻灯片/freplacementgirlstanding.png“width=“950”height=“355”alt=“Legal Logik”/
为此:


/images/slideshows/IncorporationENG1.png'”onmouseover=“this.src=”/images/slideshows/IncorporationENG2.png'”src=“/images/slideshows/IncorporationENG1.png”width=“950”height=“355”alt=“Legal Logik”/
/images/slideshows/TransactionsENG1.png'”onmouseover=“this.src=”/images/slideshows/TransactionsENG2.png'”src=“/images/slideshows/TransactionsENG1.png”width=“950”height=“355”alt=“Legal Logik”/
/images/slideshows/ServicesENG1.png'”onmouseover=“this.src=”/images/slideshows/ServicesENG2.png'”src=“/images/slideshows/ServicesENG1.png”width=“950”height=“355”alt=“Legal Logik”/
/images/slideshows/IncorporationFR1.png'”onmouseover=“this.src=”/images/slideshows/IncorporationFR2.png'”src=“/images/slideshows/IncorporationFR1.png”width=“950”height=“355”alt=“Legal Logik”/
/images/slideshows/TransactionsFR1.png'”onmouseover=“this.src=”/images/slideshows/TransactionsFR2.png'”src=“/images/slideshows/TransactionsFR1.png”width=“950”height=“355”alt=“Legal Logik”/
/images/slideshows/ServicesFR1.png'”onmouseover=“this.src=”/images/slideshows/ServicesFR2.png'”src=“/images/slideshows/ServicesFR1.png”width=“950”height=“355”alt=“Legal Logik”/
其他一切都没变。如果有任何人有任何解决方案,或者能为我指出正确的方向,我将不胜感激


另外($lang_name==“en”)是因为该网站安装了翻译模块

我认为这与PHP脚本的HTML输出有关,而不是实际的PHP本身。 添加半美元可能会解决此问题

<img onmouseout="this.src='<?php print $base_path . $directory;?>/images/slideshows/TransactionsFR1.png';"
/images/slideshows/TransactionsFR1.png';"

我不认为你正在关闭你的标签?用HTML来显示最终结果可能也很有用,IE的问题是HTML而不是PHP(在服务器端执行)。这是一个严格意义上的HTML问题,而不是PHP问题。看看你对引号和单引号以及无结尾锚的用法(
)你的
a href
s上的标签可能是一个很好的建议(因此,网站的输出,而不是构建它的php代码).看到你的js,我建议你研究一种稍微聪明一点的方法,唯一真正的变化是鼠标悬停中的数字1变为2…那么为什么不用不与html其余部分混合的js来替换这个数字呢?:-/或者在数据属性中指定替代链接,并在一个sep中再次进行鼠标悬停arate js文件。首先你应该像sg3建议的那样拥有一个有效的html文档。然后再试一次。我不认为php与幻灯片放映有任何关系。如果我是对的,那么这就是客户端执行代码的问题。
<img onmouseout="this.src='<?php print $base_path . $directory;?>/images/slideshows/TransactionsFR1.png';"