php - Error including files after editing httpd-vhosts.conf -


i have edited apache httpd-vhosts.conf on windows to:

<virtualhost *:80>     documentroot "/applications/mamp/htdocs/mysite/"     servername mysite.local </virtualhost> 

and /etc/hosts on windows

## # host database # localhost used configure loopback interface ## #... 127.0.0.1           mysite.local 

so access xampp pc. before editing above files, working fine after editing, im getting error there error accessing file have included. using following code include file:

$root = realpath($_server["document_root"]); require_once($root."/mysite/models/login.php"); 

i noticed using require_once("../mysite/models/login.php") works , other times have use require_once("../../mysite/models/login.php") work yet requiring them on same code. problem? can 1 me on how should include files after editing apache file , windows etc/hosts file?


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -