Vertically align right DIV based on left DIV height

What would be the best way to vertically-align my list items (Cheap, Low Price, an image etc) at right DIV based on the height of the right DIV (height of the right DIV is driven by the size of the big text on the left DIV) without giving a fixed height to the DIV?

Read More

How to let your html page run php code?

Do you know that we can add php code at a html page, and run these php code? For different php version, we have to add different code at .htaccess. For php5, we add the following code: # Use PHP5 as default AddHandler application/x-httpd-php5 .html .htm .php

Read More

Disable Directory Browsing with .htaccess

If there is no default homepage, such as index.htm, index.html, index.php, and so on, all the documents and files will be listed. Hackers often use this to find backdoor for them to hack a web site. If you are using a linux related web hosting, you can use .htaccess to disable directory browsing. Just add […]

Read More

How to Disable Drupal User Registration

If you do not like others to register your drupal based websites, login your drupal based website admin panel. Go to User management -> User settings. Under Public registrations, choose “Only site administrators can create new user accounts.” Save and done. I have tested Drupal 6.22.

Read More

How to add extra text at wordpress homepage?

Sometimes we need to add some very important test at homepage for SEO purpose, say I am running an eyeglasses blog, and I need to add a short description at the beginning of homepage so that google can know the main point. How to do? <?php if (is_home()): ?> <div> Do you like discount eyeglasses? […]

Read More

How to set date.timezone?

When we install zen-cart v1.3.9h, if we do not set date.timezone correctly, the message E”RROR: date.timezone not set in php.ini. Please contact your hosting company to set the timezone in the server PHP configuration before continuing.” will bump out.

Read More

How to use PHP to replace some special data?

PHP code book (32) , Linux CD Disk(8), Apache Skills (732) If we want to let remove “()”, and the number inside (), at the same time remove the whitespace before “,”. We can use PHP to meet the demand:

Read More