“PHP Obtenga URL” Código de respuesta

PHP Obtenga URL completa

$fullURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
Grepper

Obtener URL PHP

$url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
NachooCh

Cómo obtener el enlace de la página actual en PHP

<?php  
    if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')   
         $url = "https://";   
    else  
         $url = "http://";   
    // Append the host(domain name, ip) to the URL.   
    $url.= $_SERVER['HTTP_HOST'];   
    
    // Append the requested resource location to the URL   
    $url.= $_SERVER['REQUEST_URI'];    
      
    echo $url;  
  ?> 
Wild Weasel

Obtenga un enlace de URL en PHP

actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
adriendums

PHP Obtenga URL

$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
Smiling Stag

PHP obtiene datos de URL

// previous link 
<a href="test_get.php?subject=PHP&web=W3schools.com">Test $GET</a>
// the code
<?php
echo "Study " . $_GET['subject'] . " at " . $_GET['web'];
?>
MohammadMark

Respuestas similares a “PHP Obtenga URL”

Preguntas similares a “PHP Obtenga URL”

Más respuestas relacionadas con “PHP Obtenga URL” en PHP

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código