PHP file writing instruction.

August 7, 2008

When you save a php file, you should give a .php extension. For example you have start your first php program then make the filename suppose firstprogram.php where php is the file extension and firstprogram is the file name.

Below is some examples on how to make comments on PHP.

// This comment extends to the end of the line.
/* This is
a multi-line
comment
*

Tags: , ,


How to setup content type header using PHP

August 5, 2008

Content type header is very important for SEO resons, but some browser eg: Mozilla don’t accept content-type correctly when writed by regular method.

Hence you have to set content type using server setting also (eg using PHP). Server side setting will allow you to set default content type and encoding for all documents.

You may also set content type and encoding document wise using server side scripts. By using PHP, you could add this line at the very top of script:

header (’Content-type: text/html; charset=iso-8859-1?);


Linux good habits

August 3, 2008

Just read it, an interesting article.