DOCUMENT_ROOT |
|
I need a function which will always return the root. How do I do this?
Thanks |
||||||||||||
|
Site Admin
|
'DOCUMENT_ROOT' is a variable supported by Apache. You may have different DOCUMENT_ROOTs for different virtual hosts.
When you run with debugger (phped), do you use Apache? Probably not and it explains why values differs. I'd recommend you to switch to Apache if your application depends on Apache variables. To get debugger working under Apache, you'll need to install it there. Please proceed with this FAQ post: http://forum.nusphere.com/howto-install-debugger-module-t576.html |
||||||||||||
_________________ The PHP IDE team |
|
I should add; under settings/embedded web server, the default home directory is set correctly to the root. I believe this is what should be returned, instead the actual path to the script is returned?
|
||||||||||||
|
Site Admin
|
I could not replicate this problem.
I created project, created a subdirectory in it, created phpinfo file, ran it and after all it shows me project's root, not path to the file. |
||||||||||||
_________________ The PHP IDE team |
|
Well, that does not help me very much.
perhaps this is the difference. Because I was using xampp before phped all my projects are under xampp\htdocs. the projects which i have created with phped are not under the phped projects path, but rather point to a xampp\htdocs. $_root = $_SERVER['DOCUMENT_ROOT']; echo ("Document Root '" . $_root . "'<br>"); the above code definitely gives me the path to the script and not the root. Can you try creating a project which is not under phped and then execute the above code. Thanks. |
||||||||||||
|
Site Admin
|
if you have xampp, why don't you install dbg debugger there and debug your projects using xampp instead of the internal server as I suggested before?
|
||||||||||||
_________________ The PHP IDE team |
|
Give me a link on how to do that, please.
|
||||||||||||
|
Site Admin
|
it's what I did before too
To get debugger working under Apache, you'll need to install it there. Please proceed with this FAQ post: http://forum.nusphere.com/howto-install-debugger-module-t576.html |
||||||||||||
_________________ The PHP IDE team |
DOCUMENT_ROOT |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by