Jump to content

Pull URL


lilman

Recommended Posts

I am trying to pull the url of the page. I looked at php.net and found this function [code]$path_parts = "/public_html/students/index.php";
$file = basename($path_parts);[/code]

Basename will read $path_parts and will output this: index.php

I wasn't able to find one that could grab the live url path and return the base name of the file. Does anyone know of a function that can do that?
Link to comment
https://forums.phpfreaks.com/topic/27647-pull-url/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.