繁体   English   中英

PHP幻灯片无法在Internet Explorer上运行

[英]PHP Slideshow Won't Work on Internet Explorer

我通过直接访问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
                }
                ?>  

对此:

<div class="slideshow">
                <?php
                if($lang_name == "en"){
                ?>
                    <a href="https://www.legallogik.com/incorporation">
                    <img onmouseout="this.src='<?php print $base_path . $directory; ?>/images/slideshows/IncorporationENG1.png'" onmouseover="this.src='<?php print $base_path . $directory; ?>/images/slideshows/IncorporationENG2.png'" src="<?php print $base_path . $directory; ?>/images/slideshows/IncorporationENG1.png" width="950" height="355" alt="Legal Logik"/>
                    <a href="https://www.legallogik.com/business-transactions">
                    <img onmouseout="this.src='<?php print $base_path . $directory; ?>/images/slideshows/TransactionsENG1.png'" onmouseover="this.src='<?php print $base_path . $directory; ?>/images/slideshows/TransactionsENG2.png'" src="<?php print $base_path . $directory; ?>/images/slideshows/TransactionsENG1.png" width="950" height="355" alt="Legal Logik"/>
                    <a href="https://www.legallogik.com/services">
                    <img onmouseout="this.src='<?php print $base_path . $directory; ?>/images/slideshows/ServicesENG1.png'" onmouseover="this.src='<?php print $base_path . $directory; ?>/images/slideshows/ServicesENG2.png'" src="<?php print $base_path . $directory; ?>/images/slideshows/ServicesENG1.png" width="950" height="355" alt="Legal Logik"/>
                <?php
                }else{
                ?>
                    <a href="https://www.legallogik.com/fr/forfaits-dincorporation">
                    <img onmouseout="this.src='<?php print $base_path . $directory; ?>/images/slideshows/IncorporationFR1.png'" onmouseover="this.src='<?php print $base_path . $directory; ?>/images/slideshows/IncorporationFR2.png'" src="<?php print $base_path . $directory; ?>/images/slideshows/IncorporationFR1.png" width="950" height="355" alt="Legal Logik"/>
                    <a href="https://legallogik.com/fr/Transactions-Commerciales">
                    <img onmouseout="this.src='<?php print $base_path . $directory; ?>/images/slideshows/TransactionsFR1.png'" onmouseover="this.src='<?php print $base_path . $directory; ?>/images/slideshows/TransactionsFR2.png'" src="<?php print $base_path . $directory; ?>/images/slideshows/TransactionsFR1.png" width="950" height="355" alt="Legal Logik"/>
                    <a href="https://legallogik.com/fr/nos-services">
                    <img onmouseout="this.src='<?php print $base_path . $directory; ?>/images/slideshows/ServicesFR1.png'" onmouseover="this.src='<?php print $base_path . $directory; ?>/images/slideshows/ServicesFR2.png'" src="<?php print $base_path . $directory; ?>/images/slideshows/ServicesFR1.png" width="950" height="355" alt="Legal Logik"/>
                <?php
                }
                ?>  

剩下的一切都一样。 如果任何人有任何解决方案或可以指出正确的方向,将不胜感激。

PS($ lang_name ==“ en”)是因为该站点已安装翻译模块。

我认为这与PHP脚本的HTML输出有关,而不与实际的PHP本身有关。 添加分号可能会解决该问题。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM