Answers for "php get path of url"

PHP
2

php get url path name

parse_url( $_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH );
Posted by: Guest on November-04-2020
0

part of url php

//https://www.google.com/search?key=1234
	$url = $_SERVER['REQUEST_URI']; 
    $url_components = parse_url($url); 
    parse_str($url_components['query'], $params); 
    $key = $params['key']; 

// key=1234
Posted by: Guest on October-06-2020

Browse Popular Code Answers by Language