how to find out the path of a script with php |
Guru master
|
The using complete filenames is something the build in SRV does.
A normal webserver does not use complete physical paths. Because SRV is kinda limited in functionality (for quick testing purposes only) it is not suited for situations like yours. I would advise you to install a 3rd party web-server (apache or something like it), which will avoid those problems altogether. |
||||||||||||
|
|
I actually use an apache on my pc... so SRV serves the requests from the debugger and the apache the requests from the browser. I still believe there is a solution based on the SERVER[]-values but since I'm lazy (as most coder) I'm using "if $_SERVER['PORT']=8080..." in the scriptconfiguration. Not elegant, but it works.
|
||||||||||||
|
Guru master
|
By default PhpED using the built in webserver for debugging because that is setup correctly and does not need extra configuration. This is done because and out of the box working solution is more user friendly and is enough initially.
However if you want to do more serious debugging this will not suffice, as I already said. If you configure your project as being hosted on a "3rd party server", all you need to do to debug using your apache is install the php dbg module. Then both browser and debug requests will be handled by the apache server and exit your issues. Just open the PhpED manual and Checkout the "Debugging and Profiling" section. There is a "Configuring Debugger" beneath that with a "Installing php debugger on 3rd party web servers" entry which should guide you through the process. |
||||||||||||
|
|
Thanks for your tips - I'll try them within the next days. Concerning the build-in webserver you are SO right. Exactly this out-of-the-box-behavior was the reason for me to buy phped. Ofcourse it is a great editor but in the first place the simple and quick "edit-debug-loop" convinces a php-coder, who is stressed by thousands of print_r in the past ten years!
|
||||||||||||
|
Guru master
|
Haha trust me, I've been there as well. But then I discovered DBG. I think that at that time dmitri wasn't even working for NuSphere yet (not sure). So i started toying around with it, installed an editor that supported the debugger and my php-life has simplified (professionally that is ) a lot since. Dunno exactly when I found out about NuSphere itself. Probably after I wanted to update and saw it mentioned on the DBG webpage. Been hooked ever since.
I've tried products using XDebug and products supporting the Zend debugger and I still prefer PhpEd+DBG (even 5 years later). |
||||||||||||
|
how to find out the path of a script with php |
|
||
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