xampp - PHP : I need to read value from ur "www.smple.com/sample.php/value in php -
i need read value url in php code. below sample url . passing value after php file name. know can use query string "www.smple.com/sample.php?name=value"
but requirement url need filename/value, value dynamic. please 1 can me solve issue.
use parse_url path url , use explode split segments.
$uri_path = parse_url($_server['request_uri'], php_url_path); $uri_segments = explode('/', $uri_path); echo $uri_segments[1];
Comments
Post a Comment