Home > Articles > Programming > PHP

  • Print
  • + Share This
This chapter is from the book


  1. Will the include() statement slow down my scripts?

  2. Because an included file must be opened and parsed by the engine, it will add some overhead. The benefits of reusable code libraries often outweigh the relatively low performance overhead, however.

  3. Should I always end script execution if a file cannot be opened for writing or reading?

  4. You should always allow for this possibility. If your script absolutely depends on the file you want to work with, you might want to use the die() function, writing an informative error message to the browser. In less critical situations, you will still need to allow for the failure, perhaps adding it to a log file. You can read more about logging in Hour 22, "Debugging."

  • + Share This
  • 🔖 Save To Your Account