DIGIT-ARC read-only archive · snapshot: July 23, 2026

Reading Wrox for PHP

5 posts · originally from https://geek.digit.in/community/threads/reading-wrox-for-php.151310/

RBX
RBX Original post #1
Jan 13, 2012 at 10:28 AM
I've started learning PHP and found that people prefer Wrox from an old thread of this forum.

My question - Is this book really reliable ?
The page 55 here says that $path in setcookie() is used to define path where the cookie is stored. I tried experimenting to store cookie at a custom location and see what is inside cookie. When I failed after a few tries, I referenced PHP: setcookie - Manual which says something else.

Encountering an error so early in the book makes me question the correctness of this book. Is this really the right book for PHP ?
krishnandu.sarkar
Jan 13, 2012 at 10:36 AM
Both the page says same. Check again.
RBX
RBX #3
Jan 13, 2012 at 10:44 AM
php.net said:
The default value is the current directory that the cookie is being set in
as far as I can guess, this suggests the directory level at which the cookie was set, so pages at similar and deeper levels within the same tree can access the cookie.


Worx said:
Path (the directory where the cookie will be saved — the default is usually sufficient; this is optional).
strikes to me as the cookie file will be saved in the directory specified in the path. I tried the method on php.net and no file was being saved.
krishnandu.sarkar
Jan 13, 2012 at 11:05 AM
Look where the cookie will be saved is defined in php.ini

And that path is optional parameter. If you provide the path it'll set the cookie on that path otherwise the default path that's set in php.ini

That's the thing written there, but for simplicity they should have wrote "The default value is the current directory that the cookie is being set in php.ini" to make it more comfortable.
RBX
RBX #5
Jan 13, 2012 at 11:44 AM
w3schools says that too and I'm most comfortable with its statement. I'll leave it here as most probably this will not be thing involved in general development of website.
What I hope is that this book will present topics in a manner that I rely on it for building my foundation in PHP.