簡體   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