Testando coisas no PHP LDAP
Gitea Actions Demo / Deploy (push) Successful in 1m52s
Details
Gitea Actions Demo / Deploy (push) Successful in 1m52s
Details
This commit is contained in:
parent
eb44d00725
commit
925adcba97
|
@ -1,6 +1,24 @@
|
|||
<?php
|
||||
// Autenticação básica HTTP para obter o nome de usuário
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
$target_dir = "/var/www/html/aliceclass_videos/" . $username;
|
||||
|
||||
# check if user dir exists
|
||||
if (!file_exists($target_dir)) {
|
||||
|
||||
# if not, create it
|
||||
if (mkdir($target_dir, 0775, true)) {
|
||||
// echo "Directory created successfully.";
|
||||
}
|
||||
|
||||
if (mkdir($target_dir . "/src", 0775, true)) {
|
||||
// echo "Directory created successfully.";
|
||||
}
|
||||
|
||||
if (mkdir($target_dir . "/dest", 0775, true)) {
|
||||
// echo "Directory created successfully.";
|
||||
}
|
||||
}
|
||||
|
||||
// Exibir o nome de usuário
|
||||
echo '<div class="username">';
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
---
|
||||
layout: default
|
||||
lang: pt
|
||||
---
|
||||
|
||||
<?php
|
||||
$username = $_SERVER['PHP_AUTH_USER'];
|
||||
$target_dir = "/var/www/html/aliceclass_videos/" . $username;
|
||||
|
|
Loading…
Reference in New Issue