Jump to content
Larry Ullman's Book Forums

Page 181 Separate View File For Displaying Errors


Recommended Posts

Greetings,

 

I'm building a shopping website like your 'coffee' website.  I started practicing with the paid website (ex1), which has a config.inc.php file.  However, (as far as I understand) the shopping website has a config.php file instead.

 

I'm following the book in order.  I also downloaded your two zip files ecom_scripts_ex1 and _ex2, so I can compare my progress.

 

On page 181, bottom it is said that "Every PHP script in this site uses view file - separate HTML pages - to display content.  [And] Technically, a separate view file should be created for displaying errors, too."

I am not sure which file that is among the files I downloaded.  Is that the config.inc.php file with programming content "Error Management"?  If so, do I integrate the content into the config.php?

 

Also, I am assuming, since there is a closing PHP tag in the end, that it should be OK to close the file, as I have been following the instructions to Omit the closings in such.

 

Your advice is much appreciated.

 

Link to comment
Share on other sites

First of all, this book assumes complete comfort with PHP & MySQL. You need that in order to really get through this book. 

 

As for the view file for errors, I say one should be created, which means it doesn't exist yet; you'll need to do that. The config files are just configuration files. 

 

As for the closing PHP tag, I'm not sure what you mean, particularly by "close the file". Not sure what you mean by that.

Link to comment
Share on other sites

"one should be created", yes, I missed on the meaning.    I'm sure somewhere in the book you mention comfort level on knowledge of PhP and SQL. I'm pretty comfortable with database for 15+ years but php is new to me.  Regardless, the logic of php makes sense, however, I guess one should be comfortable with commands.

 

Thank you for responding to my question, Larry.  I had first borrowed your book through the library.  After reading some of the content, decided to purchase it. Now I'm working on the applications.   I appreciate you have downloads.  Most of all thank you greatly for your availability in responding... I mean.. looking at all the plenty of books you have published, it must take enormous time to be attentive.

 

I'm sure I will post back ... because I have taken on a project and your book is inspiration to me.

Link to comment
Share on other sites

About the closing tag, sorry, I don't remember what I was thinking at the time and I called it 'closing the file'.  I am guessing, I thought of just a closing tag which normally would exist but for some technical reason is best left out and continued elsewhere or some other time.  See the thing is, you are great in showing steps, but at occasions the 'learner' has to wait for the next chapter to know a bit better.  So the closing tag may exist in the next chapter. (?)

 

Will figure on my own for now.  If I believe I can pass over my experience to others who may think the way I do, I will post.

 

Thanks again.  Truly.. much appreciated.

Link to comment
Share on other sites

 Share

×
×
  • Create New...