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 76%Total: 4,083 This week: 1All time: 726 This week: 879Down
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
Age: 32
All time rank: 563 in Brazil Brazil
Week rank: 214 Down16 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,083
This week:1
All time:726
This week:879Down
 User Ratings  
 
 All time
Utility:96%StarStarStarStarStar
Consistency:93%StarStarStarStarStar
Documentation:93%StarStarStarStarStar
Examples:96%StarStarStarStarStar
Tests:-
Videos:-
Overall:76%StarStarStarStar
Rank:38