Archive for August 2008

Using vi to replace a string in multiple files

Sometime you may want to replace occurences of a string across multiple files. There is an easy way to do so with the help of the vi editor. This example will illustrate the power of vi: Suppose you have 100 .html files, and you want to replace the occurence of the string ’2007′ with ’2008′. [...]

Display page load time

You may want to display the time it took to load a page. Following is a set of simple PHP code which would help you achieve this goal. Place the following snippet at the very top of your page. (Ultimately, it’s advisable to have a header file and a footer file that are included on [...]