PHP Classes
elePHPant
Icontem

PathParser: Parse URL or file paths and compute relative paths

Recommend this page to a friend!
  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 (11 years ago) RSS 2.0 feedStarStarStarStar 74%Total: 4,085 All time: 727 This week: 963Down
Version License Categories
pathparser 1.0.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
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,085
This week:0
All time:727
This week:963Down
 User Ratings  
 
 All time
Utility:94%StarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:88%StarStarStarStarStar
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:74%StarStarStarStar
Rank:131