Jump to content

firefox having trouble with php


lesk

Recommended Posts

Hi! Actually i have 2 problems. First one is that on firefox the php script dosent work, and on safari it works just the way my friend (making a portfolio for her) wants it but it crashes when you use the dropdown menu.

 

the php.

 

<table cellspacing="5">

  <tr>

<?php

        $dirname = "../bilder/portratt";

$images = scandir($dirname);

$dirname = "../bilder/portratt";

$thumb = scandir($dirname);

$ignore = Array(".", "..");

foreach($images as $file)

    {

    if(!in_array($file, $ignore))

        {

               

        echo "<td><img src=\"..\bilder\portratt/$file\" height=\"400\" alt=\"bilderna\" ></td>";

       

        };

    } 

        ?>

 

  </tr>

</table>

 

the html for the dropdown

 

<ul id="right_menu">

        <li><a href="#">Portfolio</a>

        <ul>

            <li><a href="html/portratt.php" target="bildplats">Porträtt</a></li>

            <li><a href="html/brollop.php" target="bildplats">Bröllop</a></li>

            <li><a href="html/natur.php" target="bildplats">Natur</a></li>

        </ul>

            </li>

            </ul>

       

                <ul id="right_menu2">

            <li><a href="#">Blogg</a></li>

            <li><a href="html/kontakt2.php" target="bildplats">Kontakt</a></li>

        </ul>

 

And  the css for the dropdown

 

li ul {

    display: none;

}

li:hover > ul {

    display: block;

}

 

 

ul#nav li ul {

    display: none;

}

ul#nav li:hover > ul {

    display: block;

}

 

 

The code works in safari, but then the dropdown menu makes the browser to crash (atleast i think it makes it crash, it happens when you start messing around on it). And in firefox the dropdown dosent make it crash but instead it dosent show any pictures. Just shows the alt wich is "bilderna" Like if its 4 pictures in that folder it says bilderna four times. But safari shows me four pictures.

I cant get my head around this, really need some help on this one

Link to comment
https://forums.phpfreaks.com/topic/192488-firefox-having-trouble-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.