- 2
- 0
- NAS
- DS716j
- Operating system
- Windows
My last question has not been answered, probably I was not clear enough (I am just a hobby-programmer and still fighting with the theme). I'll try it more precise:
On my Synology NAS DS716j I created a virtual Host (Website).
The configuration of the vHosts shows me, that Document_Root points to web/Website.
When I open this website in my browser (http://192.168.1.22/Website/ ), and query for $_Server["DOCUMENT_ROOT"], I receive following result:
"/var/services/web"
What can I do, that Document Root points to "/var/services/web/Website (respectively to /Website) ?
The reason is, that I need absolute path for my Include/require commands.
Example:
<?php include $_SERVER["DOCUMENT_ROOT"] . '/phpadds/header.php'; ?>
Failed opening '/var/services/web/phpadds/head.php'
My Website is hosted on a hosting-Server. I use NAS to develop my website. Therefore, it would be good, weather I could use the same include on both environments. The Include works on the hoster.
On my Synology NAS DS716j I created a virtual Host (Website).
The configuration of the vHosts shows me, that Document_Root points to web/Website.
When I open this website in my browser (http://192.168.1.22/Website/ ), and query for $_Server["DOCUMENT_ROOT"], I receive following result:
"/var/services/web"
What can I do, that Document Root points to "/var/services/web/Website (respectively to /Website) ?
The reason is, that I need absolute path for my Include/require commands.
Example:
<?php include $_SERVER["DOCUMENT_ROOT"] . '/phpadds/header.php'; ?>
Failed opening '/var/services/web/phpadds/head.php'
My Website is hosted on a hosting-Server. I use NAS to develop my website. Therefore, it would be good, weather I could use the same include on both environments. The Include works on the hoster.