вход   

Пример суперглобального массива $_SERVER для этой страницы

весь список раздела "Шпаргалка"

Array
(
    [HTTPS] => on
    [SCRIPT_URL] => /help_bitrix/array_server.php
    [SCRIPT_URI] => http://deaks.ru/help_bitrix/array_server.php
    [X_DOCROOT] => /home/a0008131/domains/deaks.ru/public_html
    [REMOTE_USER] => 
    [HTTP_HOST] => deaks.ru
    [HTTP_X_REAL_IP] => 3.238.82.77
    [HTTP_X_FORWARDED_PROTO] => https
    [HTTP_CONNECTION] => close
    [HTTP_USER_AGENT] => CCBot/2.0 (https://commoncrawl.org/faq/)
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5
    [HTTP_IF_MODIFIED_SINCE] => Tue, 23 Jul 2024 18:46:51 GMT
    [HTTP_ACCEPT_ENCODING] => br,gzip
    [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
    [SERVER_SIGNATURE] => 
Apache/2.4.6 Server at deaks.ru Port 80
[SERVER_SOFTWARE] => Apache/2.4.6 [SERVER_NAME] => deaks.ru [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 3.238.82.77 [DOCUMENT_ROOT] => /home/a0008131/domains/deaks.ru/public_html [REQUEST_SCHEME] => http [CONTEXT_PREFIX] => [CONTEXT_DOCUMENT_ROOT] => /home/a0008131/domains/deaks.ru/public_html [SERVER_ADMIN] => webmaster@from.sh [SCRIPT_FILENAME] => /home/a0008131/domains/deaks.ru/public_html/help_bitrix/array_server.php [REMOTE_PORT] => 43282 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.0 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /help_bitrix/array_server.php [SCRIPT_NAME] => /help_bitrix/array_server.php [PHP_SELF] => /help_bitrix/array_server.php [REQUEST_TIME_FLOAT] => 1729022992.5316 [REQUEST_TIME] => 1729022992 )


Полный адрес главной страницы сайта

код php
    $actual_link_home_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://".$_SERVER['HTTP_HOST'];
    
$actual_link_home_url = https://deaks.ru


Полный адрес текущей страницы сайта с параметрами

код php
    $actual_link_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    
$actual_link_url = https://deaks.ru/help_bitrix/array_server.php