Is there a way in php to find out what a public folder on the hosting is called? eg on some hosts its public_html, on others it's htdocs, others its simply www.
I'm, trying to write a script and I need to get this information to use later on.
eg I could use:
echo getcwd();
to get the full path but wondered if there is a way in php to just echo the public folder?
You can use the $_SERVER['DOCUMENT_ROOT'] to find out the public folder in system and it's give the only the path till the public folder.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.