Create your maintenance page with PHP

With maintenance page created, it is very helpful for a web programmer to perform the maintenance and other task if it is needed.

Actually it is very easy to create maintenance page for a PHP script, all you need is create a simple maintenance page with image or meaningful word with maintenance.html and php script with maintenance.php.

I will not going to teach you to create the maintenance.html where you may just put it as “Domain.com is under maintenance” or whatever.

Today, I will guide you the script of the maintenance function in maintenance.php.

==================
<?php
function maintenance($mode = FALSE){
if($mode){
header(“Location: http://mickgenie.com/maintenance.php”);
exit;
}else{
header(“Location: http://mickgenie.com/”);
exit;
}
}
?>

==================

Go to your index.php or any other index handler page, add this to the line just after the PHP open tag.
require_once(“maintenance.php”);

Then, if you wish to enter maintenance mode, just add the following line after the require_once line.
maintenance(TRUE);

How to Clear Temporary Cache for specific domain with IE 8

If you are the web programmer, you surely need to keep clear the Internet Browser cache to understand the actual result of your new amend coding. With IE8, you do not need to always clear cache for all of the domain but you may clear the cache from specific domain only.

By default, IE 8 do come with IE 8 Developer Tool that allow you to specifically clear cache from a particular domain. To enable it, you may select Tools from IE 8 and click on the D
Developer Tools or directly use the shortcut key with F12.

From the Cache Menu, select on “Clear Browser Cache for this Domain…” or use Ctr + D.

For earlier version of IE, you may actually download the add-on from Microsoft site as URL here.

Classic ASP script error messages are no longer shown in a Web browser by default

With IIS 7.x, ASP error is disabled by default. Hence, the web programmer will not know what is the detailed error from your scripting and the following error shown.

An error occurred on the server when processing the URL. Please contact the system administrator.

To work around this problem, you could set the detailed error through IIS or web.config file.

Method 1:

1. Open IIS or run inetmgr.
2. Click on the websites.
3. Click on the ASP icon.
4. Expand the Debugging Properties.
5. On Send Errors To Browser parameter set to True.

Method 2:

Open your web web.config file, add the following command.

<configuration>
<system.webServer>
<asp scriptErrorSentToBrowser="true" />
</system.webServer>
</configuration>

Method 3:

Run the following command to enabled from server end.

%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true