Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get current page 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;  
  ?>   
Comment

php current page

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

PREVIOUS NEXT
Code Example
Php :: Undefined property: stdClass::$ 
Php :: sometimes validation in laravel 
Php :: how to use model not found exception handler laravel 
Php :: hasmany relation in laravel 
Php :: php substr_replace 
Php :: Method IlluminateDatabaseEloquentCollection 
Php :: php show hide td 
Php :: php receive request 
Php :: isset in php 
Php :: laravel collection pop 
Php :: php test questions 
Php :: artisan app name 
Php :: how to fetch associate data from csv in php 
Php :: laravel index method 
Php :: $wpdb foreach 
Php :: php 2 decimal even if not exists 
Php :: create qr code png image of 200*200 using phpqrcode 
Php :: Redirect to HTTPS & remove www 
Php :: php find in array 
Php :: laravel map the output of the api 
Php :: shortcode wordpress form 
Php :: laravel 6 use username on url 
Php :: Declare A PHP Array 
Php :: laravel crud example 
Php :: base64_img 
Php :: form submit self php isset 
Php :: sweet alert confirm box laravel 
Php :: php session 
Php :: how to make a variable in php 
Php :: laravel create command tutorial 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =