Is it possible to translate the relative virtual server path to the physical path in PHP?
eg. if I have a url:
/home/index.php
then find the physical path of index.php somehow from some other script?
Are you looking for realpath
$path = 'mydir/index.php'; echo realpath($path);
Prepare $_SERVER["DOCUMENT_ROOT"]the script for the path.
$_SERVER["DOCUMENT_ROOT"]
Source: https://habr.com/ru/post/1732823/More articles:What should I do with the default menu items in MainMenu in a new Cocoa application? - cocoaRounding DateField angles in Flex 4? - flexcreate numbered files in C - cHow do you configure the svn turtle settings for all users in the project? - version-controlCastle Project Active Record or Free NHibernate - ormAlternative for templates in C ++ - c ++the problem of mixing c and C ++ - c ++How can I generate virtual properties using AssemblyBuilder in C # 4.0? - reflectionPython: Как получить доступ к объекту родительского класса через экземпляр производного класса? - pythonCakePHP: Quarter accurate time input - htmlAll Articles