Jump to content
Larry Ullman's Book Forums

Recommended Posts

Hi Larry,


I'm a newbie so please forgive the basic questions


On page 60, you wrote the code:



     DEFINE('LIVE', false);


You said if you wanted to allow the live setting to be set on a single page, in order to debug that page, you would write:


DEFINE('LIVE', true);



I don't really understand this logic.

If you wanted to debug a specific page, you would write on the specific page, 

DEFINE('LIVE', true);



So 'LIVE' would be set to true, then the config.inc.php file would be called, but my confusion is:


QU 1: After the config.inc.php is called, how would that debug the specific page in question ie, how would that then link back to the specific page you wanted to debug?

Qu 2: In the above scenario, is the website  initially offline, ie localhost, because 'LIVE' is set to false, and you have then changed 'LIVE' to true, in one page, in order to see how it operates in a live environment?


Qu 3: Can you explain the process of setting 'LIVE' to true on one specific page ie, the config.inc.php file is called and............


Thank you.




Link to post
Share on other sites
  • 2 weeks later...

Sorry for the delayed reply! As for why you need to include (not call) the config.inc.php file on every page, that's how you ensure that every page in the site has access to the same information and is configured to behave in the same way (e.g., handle errors). This is both a common thing to do and rather important. 

As for the other specific questions, are you still unsure about those? If so I'll revisit the code and the book to ensure I can explain it properly. I don't remember that logic off the top of my head. 

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.

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.

  • Create New...