AW: Get info if and who is loged in with .htaccess?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

of course!


Take a look on this sample from Manual:
https://secure.php.net/manual/en/features.http-auth.php


<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
    header('WWW-Authenticate: Basic realm="My Realm"');
    header('HTTP/1.0 401 Unauthorized');
    echo 'Text, der gesendet wird, falls der Benutzer auf Abbrechen drückt';
    exit;
} else {
    echo "<p>Hallo {$_SERVER['PHP_AUTH_USER']}.</p>";
    echo "<p>Sie gaben {$_SERVER['PHP_AUTH_PW']} als Passwort ein.</p>";
}
?>


Regards,
Tobias


-----Ursprüngliche Nachricht-----
Von: Michelle Konzack [mailto:linux4michelle@xxxxxxxxxxxxxxx] 
Gesendet: Mittwoch, 30. Mai 2018 07:57
An: PHP General
Betreff:  Get info if and who is loged in with .htaccess?

Good morning,

I need a simple method to give some users access to a webhost and
like to use the .htaccess to controll the directories which they
can access

I want to place in each directory an index.php to show the file
listing, offer uploads and deleting of files, etc.

Question:

Is it possibel from PHP5, to know which authenticated user is
connecting?

Thanks in advance

-- 
Michelle Konzack        Miila ITSystems @ TDnet
GNU/Linux Developer     00372-54541400


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux