PHP Classes

PathParser: Parse URL or file paths and compute relative paths

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-01-01 (10 years ago) RSS 2.0 feedStarStarStarStar 76%Total: 4,044 All time: 712 This week: 1,395Down
Version License Categories  
pathparser 1.0GNU General Publi...Files and Folders, Text processing
Description Author  

This class is capable of parsing absolute or relative URLs or file paths and can compute the relative path to go from a given path to another.

It resolves relative references as /./ or /../, and eliminates consecutive / characters in the input path.

It is an alternative to PHP realpath() function, with two basic differences: it works with real and virtual files, and it returns the path resolved in the same style of the input path. So, if you are parsing a relative path, it will return a resolved relative path, not the absolute path like realpath() function does.

This class can determine the relative path between two files and parse query string to extract the parameter names and values into an array.

Picture of Carlos Reche
Name: Carlos Reche <contact>
Classes: 10 packages by
Country: Brazil Brazil
Age: 31
All time rank: 553 in Brazil Brazil
Week rank: 436 Down28 in Brazil Brazil Down
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Plain text file class.pathparser.php Class PathParser class file.
Accessible without login HTML file documentation.htm Doc. Class documentation
Accessible without login Plain text file example.php Example File with examples of how to use PathParser class.

 Version Control Unique User Downloads Download Rankings  
 0%Total:4,044All time:712
 This week:0This week:1,395Down
 User Ratings  
 All time