MY mENU


Wednesday, 12 September 2012

Time & Date in PHP

PHP has the ability to dynamically generate the time and date. Using a simple line of code we are able to include this on our site, however it is important to know how the formatting works.
 
The above code outputs a long string of numbers. What these numbers represent is the time based in the amount of seconds that have passed since January 1 1970 00:00:00 GMT. This number can also be assigned to a variable:
  
Although this is a handy feature, sometimes you want a more formatted and human friendly representation of the date. You can use the date function in conjunction with the time function to display this in the format of date ( format , time ) In our case we want the start time to be now, so we will call the time first. We will demonstrate many different types of formatting
 "; 
 print date("D, F jS",$b) . "
"; 
 print date("l, F jS Y",$b) . "
"; 
 print date("g:i A",$b) . "
"; 
 print date("r",$b) . "
"; 
 print date("g:i:s A D, F jS Y",$b) . "
"; 
 ?> 
When you run this code you will see that the information is formatted in many different ways. What each of the letters means for formatting is explained on the next page.

How can I increase my hard disk speed in Windows XP/2003?


To speed up your hard disk speed we need to configure a special buffer in the computer's memory in order to enable it to better deal with interrupts made from the disk.
This tip is only recommended if you have 256MB RAM or higher.
Follow these steps:
1.      Run SYSEDIT.EXE from the Run command.
2.      Expand the system.ini file window.
3.      Scroll down almost to the end of the file till you find a line called [386enh].
4.      Press Enter to make one blank line, and in that line type
Irq14=4096
Note: This line IS CASE SENSITIVE!!!
5.      Click on the File menu, then choose Save.
6.      Close SYSEDIT and reboot your computer.
Done. Speed improvement will be noticed after the computer reboots.
Update: The most speed improvement is visible with IDE drives, however there are reports that this tweak also does good for SCSI disks. In any case, it won't harm your system, so why not try it yourself and let me know what you find.