0% found this document useful (0 votes)
43 views1 page

Config

This document defines configuration parameters for a photo gallery application including database connection details, image directories, and thumbnail size. It sets the database host, user, password and name, paths for album and gallery images, and defines the thumbnail width to 100 pixels while maintaining aspect ratio. It also establishes a MySQL database connection using the defined parameters.

Uploaded by

andi_firdaus_4
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views1 page

Config

This document defines configuration parameters for a photo gallery application including database connection details, image directories, and thumbnail size. It sets the database host, user, password and name, paths for album and gallery images, and defines the thumbnail width to 100 pixels while maintaining aspect ratio. It also establishes a MySQL database connection using the defined parameters.

Uploaded by

andi_firdaus_4
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

\\file config.

php

<?php
session_start();

// db properties
$dbhost = 'localhost';
$dbuser = 'root'; 
$dbpass = '';    
$dbname = 'gallery';

// an album can have an image used as thumbnail
// we save the album image here
define('ALBUM_IMG_DIR', 'C:/webroot/gallery/images/album/');

// all images inside an album are stored here
define('GALLERY_IMG_DIR', 'C:/webroot/gallery/images/gallery/'); 

// When we upload an image the thumbnail is created on the fly
// here we set the thumbnail width in pixel. The height will
// be adjusted proportionally
define('THUMBNAIL_WIDTH', 100);

// make a connection to mysql here
$conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ("I cannot conn
ect to the database because: " . mysql_error());
mysql_select_db ($dbname) or die ("I cannot select the database '$dbname
' because: " . mysql_error());
?>

You might also like