Browser for folders.

Discussion in 'HTML' started by none, Mar 24, 2008.

  1. none

    none Guest

    Hi.

    I have a site where I want to automatic list folders below.
    index.htm -> where I want the foldernames below.
    folder1
    folder2
    folder3


    So my question is how can I do this with js or cgi


    Regards Rstormo
    none, Mar 24, 2008
    #1
    1. Advertising

  2. none

    Guest

    On Mar 24, 5:57 pm, none <""rstormo\"@(none)"> wrote:
    > Hi.
    >
    > I have a site where I want to automatic list folders below.
    > index.htm -> where I want the foldernames below.
    >         folder1
    >         folder2
    >         folder3
    >
    > So my question is how can I do this with js or cgi
    >
    > Regards Rstormo


    What do you mean?
    Like the option of showing the current folder content
    at a URL http://yourdomain.com/somefolder/
    where the index file is missing?
    , Mar 24, 2008
    #2
    1. Advertising

  3. none

    none Guest

    wrote:
    > On Mar 24, 5:57 pm, none <""rstormo\"@(none)"> wrote:
    >> Hi.
    >>
    >> I have a site where I want to automatic list folders below.
    >> index.htm -> where I want the foldernames below.
    >> folder1
    >> folder2
    >> folder3
    >>
    >> So my question is how can I do this with js or cgi
    >>
    >> Regards Rstormo

    >
    > What do you mean?
    > Like the option of showing the current folder content
    > at a URL http://yourdomain.com/somefolder/
    > where the index file is missing?

    Yes that sounds like exactly what I mean.

    some javascript, php or something. Tried php scandir() but that command
    was not allowed. So maybee my server have an older version.


    Regards rstormo
    none, Mar 24, 2008
    #3
  4. none

    Guest

    On Mar 24, 7:16 pm, none <""rstormo\"@(none)"> wrote:
    > wrote:
    > > On Mar 24, 5:57 pm, none <""rstormo\"@(none)"> wrote:
    > >> Hi.

    >
    > >> I have a site where I want to automatic list folders below.
    > >> index.htm -> where I want the foldernames below.
    > >>         folder1
    > >>         folder2
    > >>         folder3

    >
    > >> So my question is how can I do this with js or cgi

    >
    > >> Regards Rstormo

    >
    > > What do you mean?
    > > Like the option of showing the current folder content
    > > at a URLhttp://yourdomain.com/somefolder/
    > > where the index file is missing?

    >
    > Yes that sounds like exactly what I mean.
    >
    > some javascript, php or something. Tried php scandir() but that command
    > was not allowed. So maybee my server have an older version.
    >
    > Regards rstormo


    You must be careful because this could add
    extra links to be followed by search engines and
    it might affect the way your site is crawled
    by search engines and it might affect search results.

    You can set at server level the way a URL
    http://yourdomain/somefolder/
    appears if there is no index file there.
    If you have something like cpanel, have a look at
    Advanced > Index Manager
    For an Apache server that would add specific to your choices
    Options and IndexOptions lines
    to your .htaccess files.
    , Mar 24, 2008
    #4
  5. none

    none Guest

    wrote:
    > On Mar 24, 7:16 pm, none <""rstormo\"@(none)"> wrote:
    >> wrote:
    >>> On Mar 24, 5:57 pm, none <""rstormo\"@(none)"> wrote:
    >>>> Hi.
    >>>> I have a site where I want to automatic list folders below.
    >>>> index.htm -> where I want the foldernames below.
    >>>> folder1
    >>>> folder2
    >>>> folder3
    >>>> So my question is how can I do this with js or cgi
    >>>> Regards Rstormo
    >>> What do you mean?
    >>> Like the option of showing the current folder content
    >>> at a URLhttp://yourdomain.com/somefolder/
    >>> where the index file is missing?

    >> Yes that sounds like exactly what I mean.
    >>
    >> some javascript, php or something. Tried php scandir() but that command
    >> was not allowed. So maybee my server have an older version.
    >>
    >> Regards rstormo

    >
    > You must be careful because this could add
    > extra links to be followed by search engines and
    > it might affect the way your site is crawled
    > by search engines and it might affect search results.
    >
    > You can set at server level the way a URL
    > http://yourdomain/somefolder/
    > appears if there is no index file there.
    > If you have something like cpanel, have a look at
    > Advanced > Index Manager
    > For an Apache server that would add specific to your choices
    > Options and IndexOptions lines
    > to your .htaccess files.

    I understand that, but I need a script to do so. This because I will
    have something more on that index page.
    The page would have design but the folders are automatic generated.

    Regards rstormo
    none, Mar 24, 2008
    #5
  6. none

    Guest

    On Mar 24, 8:14 pm, none <""rstormo\"@(none)"> wrote:
    > I understand that, but I need a script to do so. This because I will
    > have something more on that index page.
    > The page would have design but the folders are automatic generated.
    >
    > Regards rstormo


    Maybe look at the PHP function opendir,
    http://uk3.php.net/opendir
    , Mar 24, 2008
    #6
  7. none

    none Guest

    wrote:
    > On Mar 24, 8:14 pm, none <""rstormo\"@(none)"> wrote:
    >> I understand that, but I need a script to do so. This because I will
    >> have something more on that index page.
    >> The page would have design but the folders are automatic generated.
    >>
    >> Regards rstormo

    >
    > Maybe look at the PHP function opendir,
    > http://uk3.php.net/opendir
    >
    >

    Thank you for pointing me in the right direction.

    This was what I looked for.

    -snip
    <html><body>
    <?php
    $dir = "./";

    // Open a known directory, and proceed to read its contents
    if (is_dir($dir)) {
    if ($dh = opendir($dir)) {
    while (($file = readdir($dh)) !== false) {
    echo "filename: $file : filetype: " . filetype($dir .
    $file) . "\n";
    }
    closedir($dh);
    }
    }
    ?>
    </body>
    </html>
    -snap


    Regards Rstormo
    none, Mar 24, 2008
    #7
  8. none

    Guest

    On Mar 24, 9:17 pm, none <""rstormo\"@(none)"> wrote:
    > Thank you for pointing me in the right direction.
    >
    > Regards Rstormo


    With your links automatically generated,
    I repeat, check that they are OK to be crawled by
    search engines, check that your robots.txt file
    is up to date.
    , Mar 24, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kishor

    path of Special Folders

    Kishor, Nov 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    570
    Tom Shelton
    Nov 24, 2003
  2. Camel Software

    Question About Visual Studio & Web Folders

    Camel Software, Nov 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    624
    Camel Software
    Nov 26, 2003
  3. Lars Pedersen

    Folders

    Lars Pedersen, Jul 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    461
    Lars Pedersen
    Jul 7, 2003
  4. Rainman

    Browse for folders

    Rainman, Jul 15, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    341
    Rainman
    Jul 15, 2003
  5. Jason

    Web Folders

    Jason, Aug 6, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    388
    Jason
    Aug 6, 2003
Loading...

Share This Page