Get Major Training|Project Training|Live Project|Industrial Training On Android| I-Phone | Java | J2SE | J2EE | C#.Net | ASP.Net| PHP | PHP with Wordpress | Joomla | Majento Contact us

Wednesday

PHP Scripting Rules For Better Website

Hi

We Love PHP for its simplicity and easy going logics and developing a php based website is more cheaper and easier then other so called paid technology like .net and Java( Huge coding required ) .

But If you want to become a good developer on php scripting beware of some tips and rule you must have to follow for a better php website.


Php Scripting Rules For Better Websites

 Rule 1 )): Use OOPs Procedural Programming works by following a routine from the top to the bottom of each page as the server reads every file on your server. With OOP, there could be one or two objects being instantiated, which, in turn could instantiate a few, a hundred or a thousand other objects which could all perform certain tasks depending on variables passed into the objects. OOP is faster, simpler, easier to debug, uses less server resources, less code, is faster loading and more logical to work with once you figure out the basic principles

Rule 2)): Use Include(); or Require() insist off Include_Once(); or Require_Once();

Since it effect Server Performance

Rule 3)) Watch Error on Php Script Using Error_Reporting( Arguments ) Function for better results and development
like



Rule 4)): Use IDE(Like Dreamweaver) For Better Understanding and Visualization

Rule 5)):Remove Chance Of Sql Injections using through functions like mysql_real_escape_string()
and post methods

Rule 6)): Set your Script Failure Time limit by set_time_limit function to avoid infinite loops and database connection timeouts. The set_time_limit puts a time limit on the maximum number of seconds a script will run (the default is 30). After that time period, a fatal error is thrown

Rule 7)): Set Encrypted Password for every logger using base64_encode or decode function or md5()

Rule8)):USe OB_Start() for buffering and website speed
Output buffering is a simple way to greatly improve the performance and speed of your PHP script. Without output buffering, your script will show the HTML on the page as it’s processed – in pieces. Adding output buffering allows the PHP to store the HTML as a variable and send it to the browser in one chunk.
To enable output buffering, simply add ob_start() like so at the top of the file.

Rule9)) Dont use extra variables intended off echo or direct use

Rule 10)); Use Google (Guide of Internet) the Supreme Power...........................



Just Use above concepts and build your own website for better and secure PHP 
Author: Vikas Agrawal
Vikas Agrawal is a CEO and Founder Of Vinayak Informatics Systems. Read More →

You Like It, Please Share This Article Using...



No comments:

Post a Comment

Please leave your comments and we will be reply you back ASAP
vikas agrawal