Napravi sam sajt
http://trajko41.freehostia.com/
i uploadovao sam sve fajlove fajlove koji mi trebaju
napravio sam bazu
username: dantra93_tehnika
password: nije bitno
database name: dantra93_tehnika
database host: mysql4.freehostia.com
database port: 3306
gde ja treba da unese ove podatke
i kako da fajl aplication.php povezem sa tom bazom
kod ovog fajla izgleda ovako
<?php
/* TERMS OF USAGE:
* This file was written and developed by Ying Zhang (
[email protected])
* for educational and demonstration purposes only. You are hereby granted the
* rights to use, modify, and redistribute this file as you like. The only
* requirement is that you must retain this notice, without modifications, at
* the top of your source code. No warranties or guarantees are expressed or
* implied. DO NOT use this code in a production environment without
* understanding the limitations and weaknesses pretaining to or caused by the
* use of these scripts, directly or indirectly. USE AT YOUR OWN RISK!
*/
/******************************************************************************
* MAIN
*****************************************************************************/
/* turn on verbose error reporting (15) to see all warnings and errors */
error_reporting(15);
/* define a generic object */
class object {};
$CFG = new object;
/* database configuration */
$CFG->dbhost = "localhost";
$CFG->dbname = "dantra93_tehnika";
$CFG->dbuser = "root";
$CFG->dbpass = "";
/* directory configuration, if all your mymarket files are in one directory
* you probably only need to set the wwwroot variable. valid examples are:
*
* $CFG->wwwroot = "
http://myserver.com/mymarket";
* $CFG->wwwroot = "
http://localhost/mymarket";
*
* do not include the trailing slash. dirroot is the physical path on your
* server where mymarket can find it's files. for more security, it is
* recommended that you move the libraries and templates ($CFG->libdir
* and $CFG->templatedir) outside of your web directories.
*/
$CFG->wwwroot = "
http://localhost/mymarket";
$CFG->dirroot = "C:/wamp/www/mymarket";
$CFG->templatedir = "$CFG->dirroot/templates";
$CFG->libdir = "$CFG->dirroot/lib";
$CFG->imagedir = "$CFG->wwwroot/images";
$CFG->picture = "$CFG->dirroot/images/picture";
$CFG->slika = "$CFG->wwwroot/images/picture/";
$CFG->icondir = "$CFG->imagedir/icons";
$CFG->bannerdir = "$CFG->imagedir/banners";
$CFG->support = "
[email protected]";
$CFG->version = "1.71";
$CFG->sessionname = "mymarket";
/* extended configuration */
$CFG->showsponsor = false; // enabled banner advertising
$CFG->currency = "din";
$CFG->currencyfirst = false; // show the currency symbol before the price tag
/* define database error handling behavior, since we are in development stages
* we will turn on all the debugging messages to help us troubleshoot */
$DB_DEBUG = true;
$DB_DIE_ON_FAIL = true;
/* load up standard libraries */
require("$CFG->libdir/stdlib.php");
require("$CFG->libdir/dblib.php");
require("$CFG->libdir/mymarket.php");
require("$CFG->libdir/cart.php");
/* setup some global variables */
$ME = qualified_me();
/* start up the sessions, to keep things simple we just have two
* variables, USER containing user information and CART containing
* the user's shopping cart. */
ini_set("session.name", $CFG->sessionname);
session_start();
session_register("USER");
session_register("CART");
/* initialize the USER object if necessary */
if (! isset($_SESSION["USER"])) {
$_SESSION["USER"] = array();
}
/* initialize the CART object if necessary */
if (! isset($_SESSION["CART"])) {
$_SESSION["CART"] = new Cart;
}
$USER = &$_SESSION["USER"];
$CART = &$_SESSION["CART"];
/* connect to the database */
db_connect($CFG->dbhost, $CFG->dbname, $CFG->dbuser, $CFG->dbpass);
?>
Pomozite ako mozete , mucim se vec 3 sata.
Pozdrav