Friday, October 5, 2012

Default index page

  1. Configuring the Default Index Page

    This section applies to all users, whether you are using PHP as a module or as a CGI binary.
    If you create a file index.php, and want Apache to load it as the directory index page for your website, you will have to add another line to the "httpd.conf" file. To do this, look for the line in the file that begins with "DirectoryIndex" and add "index.php" to the list of files on that line. For example, if the line used to be:

    DirectoryIndex index.html
    change it to:

    DirectoryIndex index.php index.html 
    The next time you access your web server with just a directory name, like "localhost" or "localhost/directory/", Apache will send whatever your index.php script outputs, or if index.php is not available, the contents of index.html.

Multilaunguage



$db
= mysql_connect('YOUR_DB_ADDRESS','YOUR_DB_USER','YOUR_DB_PASS') or die("Database error");
mysql_select_db('YOUR_DB', $db);

//SOLUTION::  add this comment before your 1st query -- force multiLanuage support
$result = mysql_query("set names 'utf8'");

$query = "select * from YOUR_DB_TABLE";
$result = mysql_query($query);

//-THE_REST_IS_UP_TO_YOU-

?>

Simply run the query "set names 'utf8' " against the MySQL DB and your output should appear correct.


Multilaunguage