How do I debug a php file with "fake" server vars? |
|
simulating GET/POST, etc variables specifically entered by the user.
|
||||||||||||
|
|
Thanks for your reply blizz!
I'll do it that way for the moment, but it would be great if there was some feature that allowed you to specify server vars by yourself just before debugging, without the need to edit the code (people absent-minded like me might forget the patched code when uploading it to the server). |
||||||||||||
|
Guru master
|
If you work with the "auto_prepend_file""-php directive that is no problem since this is only local. You aren't patching any production files either so you won't have to remember "unpatching" them. If you don't want to do any "pre-initialization" you just leave the file empty, which is fine as well. eg Just make an empty
php file somewhere and set "auto_prepend_file = php-file-path" in php.ini and restart your webserver. After that you can just put whatever you want in this file and it will be auto-executed before the control is handed to your script. I always use an auto_prepend_file for older webprojects. Some of the ancient sites I host are built with register_globals on. What my prepend file does is init essential variables like DOCUMENT_ROOT etc, so that I don't have to modify the actual sites (they aren't mine) And I can still have register_globals off on my server... |
||||||||||||
|
Site Admin
|
see Run->Parameters menu.
GET is supported for all cases, POST only for embedded IE browser. |
||||||||||||
_________________ The PHP IDE team |
How do I debug a php file with "fake" server vars? |
|
||
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