PHP - Procedural Scripts

  • As noted in the section outlining Comments & External Documentation, each file should begin with a block comment detailing important information about the file. In addition to the information outlined in the previous section, you should also include the following information:
    • Any classes that were used in the script
    • Any external files that were included using the include, include_once, require, or require_once functions.
    • A list of functions and a brief description of what each does.
    • If the page produces HTML output, be sure to include information about any client-side files that are included (i.e., JavaScript, CSS, etc.)1)
  • Constants should be defined at the beginning of the file.
  • Any included files should be included after declaring constants.
  • Any functions should be present after including any external files.
  • All procedural code should be present after all functions have been declared and coded.
1) It should be noted that any HTML produced by a PHP script should adhere to the HTML standards.
 
programming\php\procedural_scripts · Last modified: 2008/01/22 17:37 by admin
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki