RE: [PHP] No cookie is being set?
| From: | Chris Shiflett | Date: | Fri, 02 Jan 2004 21:37:20 +0000 |
| Subject: | RE: [PHP] No cookie is being set? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173652@lists.php.net to get a copy of this message | ||
--- Larry Brown <larry.brown@dimensionnetworks.com> wrote:
> when I find a function doesn't work right and I am using variables
> in its execution I run an echo/die combination immediately before
> the function to verify the data being fed to it is as it should be.
This is a very good suggestion, although your example might be confusing
to some people due to all of the quote escaping. Basically, Larry is
suggesting that you make your code appear in the browser with each of the
function parameters evaluated:
myfunc(foo, 1 + 2);
Your code may have:
myfunc($var1, $var2 + $var3);
So you might try this for debugging:
echo "myfunc($var1, $var2 + $var3);";
If this looks right, you can take it a step further to reveal the
arithmetic:
echo "myfunc($var1, " . $var2 + $var3 . ');';
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/