wampserver page
Posted by: Jovaras (---.static.zebra.lt)
Date: May 05, 2008 12:35PM

First of all I'm talking about a wamp main page where all your projects, etc are showed, the one that opens on [localhost].
So how do I make not only folders viewable but files aswell under the list of my projects?

Options: ReplyQuote
Re: wampserver page
Posted by: xsence2003 (---.nics.nxp.com)
Date: May 05, 2008 12:58PM

what do you mean exactly? bij default index.html will be shown when you type localhost in internet explorer or any other webbrowser.

Options: ReplyQuote
Re: wampserver page
Posted by: Jovaras (---.static.zebra.lt)
Date: May 05, 2008 01:16PM

I am talking about this:
[img135.imageshack.us]

Options: ReplyQuote
Re: wampserver page
Posted by: stevenmartin99 (212.129.94.---)
Date: May 05, 2008 02:50PM

you wud have tp make changes to the file supplied. Is there a need for it?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: wampserver page
Posted by: Jovaras (---.static.zebra.lt)
Date: May 05, 2008 06:48PM

Yes.

Options: ReplyQuote
Re: wampserver page
Posted by: jim_mccann (---.3.ku-graz.surfer.at)
Date: May 07, 2008 08:45AM

Hi!
The fastest way would be to simply change this part of code:
 <?php
                        // Affichage de la liste des dossiers non énumérés plus haut ( = projets ).
                        $list_ignore = array ('.','..','exemples','phpmyadmin','sqlitemanager');
                        $handle=opendir("."winking smiley;

                        $msg = $langues[$langue]['txt_no_projet'];
                        while ($file = readdir($handle)) {
                            if (is_dir($file) && !in_array($file,$list_ignore)) {    //HERE IS THE LINE WE HAVE TO CHANGE
                                $msg = '';
                                echo '<a class="ditem" href="'.$file.'"><img src="dossier.gif" alt="image dossier" /> '.$file.'</a>';
                            }
                        }
                        closedir($handle);
                        echo $msg;
                    ?>
to this:
<?php
                        // Affichage de la liste des dossiers non énumérés plus haut ( = projets ).
                        $list_ignore = array ('.','..','exemples','phpmyadmin','sqlitemanager');
                        $handle=opendir("."winking smiley;

                        $msg = $langues[$langue]['txt_no_projet'];
                        while ($file = readdir($handle)) {
                            if (!in_array($file,$list_ignore)) {    //CHANGED LINE
                                $msg = '';
                                echo '<a class="ditem" href="'.$file.'"><img src="dossier.gif" alt="image dossier" /> '.$file.'</a>';
                            }
                        }
                        closedir($handle);
                        echo $msg;
                    ?>
After you changed
if (is_dir($file) && !in_array($file,$list_ignore))
to
if (!in_array($file,$list_ignore))
files and folders will be listed inside the localhost index page.

Notice that this is not the clean, good way to do it but it's a start for you.
.
Wamp é tres bien ;-) Greetz



Edited 1 time(s). Last edit at 05/07/2008 08:47AM by jim_mccann.

Options: ReplyQuote


Sorry, only registered users may post in this forum.