Dev 2025-03-27 #01
This commit is contained in:
commit
f947aa9f23
5
.vscode/settings.json
vendored
Executable file
5
.vscode/settings.json
vendored
Executable file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"editor.fontSize": 13,
|
||||
"terminal.integrated.fontSize": 13,
|
||||
"window.zoomLevel": 1.4,
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
docker build -t mon-site-php-nginx .
|
||||
docker run -p 8080:80 mon-site-php-nginx
|
||||
|
||||
32
docker-compose.yml
Normal file
32
docker-compose.yml
Normal file
@ -0,0 +1,32 @@
|
||||
# GMo Lab
|
||||
#version: '2.3'
|
||||
services:
|
||||
|
||||
## Linux nginx mysql php
|
||||
wwwgmo-nginx:
|
||||
container_name: wwwgmo-nginx
|
||||
hostname: wwwgmo-nginx
|
||||
image: nginxinc/nginx-unprivileged:1.23-alpine
|
||||
volumes:
|
||||
- './docker/nginx/default.conf:/etc/nginx/conf.d/default.conf'
|
||||
# - './certs:/etc/nginx/certs/'
|
||||
- './src:/var/www/html:rw,cached'
|
||||
ports:
|
||||
- 8085:8080 #local:docker
|
||||
depends_on:
|
||||
- wwwgmo-php-fpm
|
||||
|
||||
wwwgmo-php-fpm:
|
||||
container_name: wwwgmo-php-fpm
|
||||
hostname: wwwgmo-php-fpm
|
||||
#image: wwwgmo
|
||||
image: gmouchet/simple-php-site:1.0
|
||||
# env_file:
|
||||
# - ./docker/php-fpm/.env
|
||||
volumes:
|
||||
- './src/:/var/www/html:rw,cached'
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./docker/php-fpm/Dockerfile
|
||||
ports:
|
||||
- '9000:9000' #local:docker
|
||||
46
docker/nginx/default.conf
Normal file
46
docker/nginx/default.conf
Normal file
@ -0,0 +1,46 @@
|
||||
# from http://geekyplatypus.com/dockerise-your-php-application-with-nginx-and-php7-fpm/
|
||||
# gzip on;
|
||||
# gzip_proxied any;
|
||||
# gzip_comp_level 5;
|
||||
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
server {
|
||||
index index.php;
|
||||
root /var/www/html;
|
||||
listen 8080;
|
||||
server_name _;
|
||||
error_log /dev/stderr;
|
||||
access_log /dev/stdout;
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location = /robots.txt {
|
||||
allow all;
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
# Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS_Store (Mac).
|
||||
# Keep logging the requests to parse later (or to pass to firewall utilities such as fail2ban)
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location / {
|
||||
disable_symlinks off;
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
# location ~ \.css {
|
||||
# add_header Content-Type text/css;
|
||||
# }
|
||||
|
||||
location ~* \.php$ {
|
||||
fastcgi_pass wwwgmo-php-fpm:9000;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
}
|
||||
|
||||
29
docker/php-fpm/Dockerfile
Normal file
29
docker/php-fpm/Dockerfile
Normal file
@ -0,0 +1,29 @@
|
||||
#FROM php:8.2.6-fpm-alpine
|
||||
FROM php:8.3-fpm-alpine3.18
|
||||
LABEL maintainer="gilles.mouchet@gmail.com"
|
||||
|
||||
#RUN apk add --no-cache mysql-client msmtp perl wget procps shadow libzip libpng libjpeg-turbo libwebp freetype icu
|
||||
|
||||
#RUN apk add --no-cache --virtual build-essentials \
|
||||
# icu-dev icu-libs zlib-dev g++ make automake autoconf libzip-dev \
|
||||
# libpng-dev libwebp-dev libjpeg-turbo-dev freetype-dev && \
|
||||
# docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp && \
|
||||
# docker-php-ext-install gd && \
|
||||
# docker-php-ext-install mysqli && \
|
||||
# docker-php-ext-install pdo_mysql && \
|
||||
# docker-php-ext-install intl && \
|
||||
# docker-php-ext-install opcache && \
|
||||
# docker-php-ext-install exif && \
|
||||
# docker-php-ext-install zip && \
|
||||
# apk del build-essentials && rm -rf /usr/src/php*
|
||||
|
||||
# install composer
|
||||
#RUN wget https://getcomposer.org/composer-stable.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer
|
||||
#RUN composer require elasticsearch/elasticsearch
|
||||
# Switch en user www-data
|
||||
USER www-data
|
||||
WORKDIR /app
|
||||
COPY --chown=www-data ./src/ /app/
|
||||
COPY --chown=www-data ./docker/php-fpm/php.ini /usr/local/etc/php/php.ini
|
||||
|
||||
EXPOSE 9000/tcp
|
||||
16
docker/php-fpm/php.ini
Normal file
16
docker/php-fpm/php.ini
Normal file
@ -0,0 +1,16 @@
|
||||
; For php.ini production
|
||||
date.timezone = "Europe/Zurich"
|
||||
memory_limit = 128M
|
||||
; This is the php.ini-production INI file.
|
||||
zend.exception_ignore_args = On
|
||||
; In production, it is recommended to set this to 0 to reduce the output
|
||||
; of sensitive information in stack traces.
|
||||
zend.exception_string_param_max_len = 0
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
mysqlnd.collect_memory_statistics = Off
|
||||
log_errors = On
|
||||
error_log = /dev/stderr
|
||||
zend.assertions = -1
|
||||
expose_php = Off
|
||||
2050
src/css/bootstrap-grid.css
vendored
Normal file
2050
src/css/bootstrap-grid.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
src/css/bootstrap-grid.css.map
Normal file
1
src/css/bootstrap-grid.css.map
Normal file
File diff suppressed because one or more lines are too long
7
src/css/bootstrap-grid.min.css
vendored
Normal file
7
src/css/bootstrap-grid.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/css/bootstrap-grid.min.css.map
Normal file
1
src/css/bootstrap-grid.min.css.map
Normal file
File diff suppressed because one or more lines are too long
330
src/css/bootstrap-reboot.css
vendored
Normal file
330
src/css/bootstrap-reboot.css
vendored
Normal file
@ -0,0 +1,330 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
line-height: 1.15;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-ms-overflow-style: scrollbar;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
text-align: left;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||
1
src/css/bootstrap-reboot.css.map
Normal file
1
src/css/bootstrap-reboot.css.map
Normal file
File diff suppressed because one or more lines are too long
8
src/css/bootstrap-reboot.min.css
vendored
Normal file
8
src/css/bootstrap-reboot.min.css
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||
1
src/css/bootstrap-reboot.min.css.map
Normal file
1
src/css/bootstrap-reboot.min.css.map
Normal file
File diff suppressed because one or more lines are too long
8975
src/css/bootstrap.css
vendored
Normal file
8975
src/css/bootstrap.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
src/css/bootstrap.css.map
Normal file
1
src/css/bootstrap.css.map
Normal file
File diff suppressed because one or more lines are too long
7
src/css/bootstrap.min.css
vendored
Normal file
7
src/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/css/bootstrap.min.css.map
Normal file
1
src/css/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
27
src/css/gmo.css
Normal file
27
src/css/gmo.css
Normal file
@ -0,0 +1,27 @@
|
||||
body {
|
||||
/*
|
||||
// text-align: center;
|
||||
//background-color: #8EA1AD;
|
||||
// font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
|
||||
// color: #990000;*/
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.error {
|
||||
color: red;
|
||||
font-size: 13px;
|
||||
margin-bottom: 23px;
|
||||
}
|
||||
|
||||
div.noerror {
|
||||
color: green;
|
||||
font-size: 13px;
|
||||
margin-bottom: 23px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 8px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 10px;
|
||||
}
|
||||
62
src/index.php
Normal file
62
src/index.php
Normal file
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Simple Page</title>
|
||||
<style>
|
||||
/* Basic CSS styling */
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f4f9;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
|
||||
//echo $_SERVER['REMOTE_ADDR'];
|
||||
//echo $_SERVER['SERVER_SOFTWARE'];
|
||||
//echo $_SERVER['REQUEST_URI'];
|
||||
//echo $_SERVER['HTTP_HOST'];
|
||||
//echo $_SERVER['SERVER_ADDR'];
|
||||
|
||||
function getServerStartTime()
|
||||
{
|
||||
if (stristr(PHP_OS, 'win')) {
|
||||
// Windows
|
||||
$output = shell_exec('net stats srv | find "Statistics since"');
|
||||
if ($output) {
|
||||
return trim(str_replace("Statistics since", "", $output));
|
||||
}
|
||||
} else {
|
||||
// Linux/Unix
|
||||
$output = shell_exec('uptime -s');
|
||||
if ($output) {
|
||||
//return trim($output);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
return "Impossible de récupérer l'heure de démarrage";
|
||||
}
|
||||
|
||||
$live=getServerStartTime();
|
||||
?>
|
||||
<h1>Welcome to my simple php page</h1>
|
||||
<p>Server name: <strong><?php echo $hostname ." (".$_SERVER['SERVER_NAME'].")"; ?></strong></p>
|
||||
<p>HTTP program: <strong><?php echo $_SERVER['SERVER_SOFTWARE']; ?></strong></p>
|
||||
<p>Server IP address: <strong><?php echo $_SERVER['SERVER_ADDR']; ?></strong></p>
|
||||
<p>Your IP address: <strong><?php echo $_SERVER['REMOTE_ADDR']; ?></strong></p>
|
||||
<p>Request URL: <strong><?php echo $_SERVER['HTTP_HOST']; ?></strong></p>
|
||||
<p>Current PHP version: <strong><?php echo "ToDo"; ?></strong></p>
|
||||
<p>Uptime pod: <strong><?php $live->format('Y-m-d H:i:s');?> UTC</strong></p>
|
||||
<p>Installation date of apache on this server: {{ date }}</p>
|
||||
|
||||
<h5>© 2023-<?php echo date("Y");?> - Simple Page. All rights reserved.</h5>
|
||||
</body>
|
||||
</html>
|
||||
40
src/index.php-dev
Normal file
40
src/index.php-dev
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
$site_title="Sample site";
|
||||
$date=date("d.m.Y");
|
||||
$time=date("H:i:s");
|
||||
$curYear=date("Y");
|
||||
$site_copyright="Version 1.0 (c) 2022-". $curYear ." - Gilles Mouchet (gilles.mouchet@gmail.com)";
|
||||
$userAgent=htmlentities($_SERVER['HTTP_USER_AGENT'],ENT_QUOTES,"UTF-8");
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title><?php echo $site_title; ?></title>
|
||||
<!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9M
|
||||
uhOf23Q9Ifjh" crossorigin="anonymous"> -->
|
||||
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="css/gmo.css">
|
||||
-->
|
||||
<style>
|
||||
body {margin-left: 15px;font-family:-apple-system}
|
||||
h1 {color: blue;}
|
||||
p {color: red;}
|
||||
h6 { font-size: 14px;}
|
||||
</style>
|
||||
</head>
|
||||
<?php
|
||||
echo "<h2>".$site_title."</h2>";
|
||||
//echo $site_copyright;
|
||||
|
||||
echo $_SERVER['SERVER_NAME'];
|
||||
?>
|
||||
<h6>
|
||||
<?php echo "Browser : $userAgent\n" ?>;<br>
|
||||
<?php echo "Nous sommes le $date, il est $time.\n"?>;<br><br>
|
||||
<?php echo "(c) $site_copyright" ?>;<br>
|
||||
</h6>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user