Directory-View with PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tobias Wendorff

    Directory-View with PHP

    Hi there,

    I've programmed an access-control via header()-function. It
    checks an username and password in database ... nothing special.

    Currently, the control gives access to a download, but I would
    like to allow special users to view the complete directory.

    AFAIK this is only possibly through ".htaccess" (Apache webserver).
    But then, I need to create an entry for each user in the database
    in the file :-(

    Would it be possible to allow this direclty through PHP?
    Of course, I could write dynamically into htaccess, but if
    several users would access the file at the same time ... URGHS :-)

    Thanks for help,
    Tobias


  • Jerry Stuckle

    #2
    Re: Directory-View with PHP

    Tobias Wendorff wrote:
    Hi there,
    >
    I've programmed an access-control via header()-function. It
    checks an username and password in database ... nothing special.
    >
    Currently, the control gives access to a download, but I would
    like to allow special users to view the complete directory.
    >
    AFAIK this is only possibly through ".htaccess" (Apache webserver).
    But then, I need to create an entry for each user in the database
    in the file :-(
    >
    Would it be possible to allow this direclty through PHP?
    Of course, I could write dynamically into htaccess, but if
    several users would access the file at the same time ... URGHS :-)
    >
    Thanks for help,
    Tobias
    >
    >
    Just get the directory listing in PHP and display it. No need to do
    anything with .htaccess.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Jits

      #3
      Re: Directory-View with PHP

      Could u pls let me know how to do this in PHP. are there any example on
      the net for which u have the links?

      I am very new to PHP and also interested in learning such things.

      Cheers
      Jitendra (BSc)
      Jerry Stuckle wrote:
      >
      Just get the directory listing in PHP and display it. No need to do
      anything with .htaccess.
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Jerry Stuckle

        #4
        Re: Directory-View with PHP

        Jits wrote:
        Jerry Stuckle wrote:
        >
        >>Just get the directory listing in PHP and display it. No need to do
        >>anything with .htaccess.
        >>
        >>--
        >>============= =====
        >>Remove the "x" from my email address
        >>Jerry Stuckle
        >>JDS Computer Training Corp.
        >>jstucklex@att global.net
        >>============= =====
        >
        Could u pls let me know how to do this in PHP. are there any example
        on the net for which u have the links?
        >
        I am very new to PHP and also interested in learning such things.
        >
        Cheers
        Jitendra (BSc)
        (Top posting fixed)







        See the user notes on the first three for details on scanning directories.

        P.S. Please don't top post. Thanks.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        Working...