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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...