I really appreciate any answer to my question because I am searching for this about two weeks. My goal is to create directories using PHP and displaying them as a virtual subdomain (All procedure should have done automatically).
For example : example.com/test/index.php should be considered as : test.example.com/index.php