add function to get document root of project, which will be <path>/public
use document root with public folder