PHP Project Precautions

From Code Trash
Jump to: navigation, search
  • date format : december 09, 2009
  • copy right : All rights reserved © 2009 [company name]
  • font: no times roman.
  • image upload: specify width and height.
  • image display in admin: no scaling use resize functions. better if thumbnails are displayed
  • dynamically if they are not going to be used anywhere in frontpage.
  • pagination. simple or complex according to the number of records.
  • newsletter or large listing. must have search.
  • newsletter shold have a mailing list.
  • newsletter should have the option of sent status and processing status.
  • LIst: order by [field] and list by alphabetical order. the same for newsletter.
  • position for listing.
  • single and multiple delete.
  • ajax session time out.
  • ajax max time out returns null string. use a script to abort before timeout.
  • ajax manual abort by page refresh returns null string... discard it. [do not show zero length strings]
  • Replace spaces in file names.
  • Replace quotes in file names. or use addslash and stripslash for file names.
  • NO null values in session or use session.bug.compact directive in htaccess.
  • Turn off magic quotes using .htaccess or local php.ini or in the config file.
  • Turn error to strict till project completes.
  • Always use strict embed tag.
  • use javascript as a seperate file.
  • always have a global variable for http path and server path.
  • sorting... searching... abcd search...
  • importing csv... dont include ignore in sql... and set email or preferred field as unique

and dont check for mysql errors because by defualt let all duplicate and error fields get discarded

  • abort ajax if response is taking more time to prevent displaying a blank screen.
  • do non use document_root of server variable because it will vary among servers. instead use __FILE__ to get the path

with replacing the filename to get the absolute path... or the preferred path...