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.

url : www.smple.com/sample.php/value

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

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -