Read Current Directory Structure in PHP
Syntax: Read folder structure from root directory : getcwd();
Output - C:\xampp\htdocs\<YOUR
FOLDER DIRECTORY>
Description: <Your
Folder Directory with root>
Syntax: Read folder structure from root
directory : dirname(__FILE__);
Output - C:\xampp\htdocs\<YOUR
FOLDER DIRECTORY>
Description: <Your
Folder Directory with root>
Syntax: Red only current folder name : basename(__DIR__)
For Example – http://autoindianews.com/car-news/
& code is in “car-news” directory it will return only car-news
Output: car-news <You’re
Folder Directory without root>
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a comment