Jump to content
Larry Ullman's Book Forums

Recommended Posts

I am having trouble understanding how one would go about solving this problem:

 

Define the login credentials — the cookie name and value — as constants in a configuration file. Then include that configuration file on every page and use those constants for creating, deleting, and confirming the value of the cookie.

 

Does 'configuration file' translate to 'text file', that acts as a sort of configuration file? I do not see what the purpose of this problem is. Why does one want the login credentials defined, a configuration file to hold the credentials, and then the file included in various pages?

Link to comment
Share on other sites

A configuration file would just be a PHP script without any HTML or anything that's included by all the other files. By using a configuration file, you can provide the same information to every script but changes only require editing the one file. It's a very common approach.

Link to comment
Share on other sites

 Share

×
×
  • Create New...