kan iemand me helpen met een config.php

Status
Niet open voor verdere reacties.

uaejeroen

Terugkerende gebruiker
Lid geworden
7 dec 2009
Berichten
1.665
PHP:
<?php

/**
 * SCRIPT CONFIGURATION
 */

// the login site name. Appears in the title section.
define("LOGIN_SITE_NAME", "User Login & Management System");

// database connection details
define("DATABASE_HOST", "localhost"); // replace your-host-here.com with your db hostname
define("DATABASE_USER", "*****_jeroen"); // replace db_user with your db username
define("DATABASE_PASS", "********"); // replace db_pass with your db password
define("DATABASE_NAME", "******_user"); // replace db_name with your db name

// front end path to the root of your site. i.e. the same folder the 'login' directory and 'uAuth.php' files appear in
define("U_FULL_PAGE_URL", "http://wonderful-story/world_quiz_game\");

// email address to send from
define("U_SENDERS_EMAIL_ADDRESS", "noreply@user-management.com");

/**
 * END OF EDITABLE CONFIGURATION VALUES. YOU GENERALLY WONT NEED TO EDIT ANYTHING BELOW HERE
 */

// script version number
define("U_SCRIPT_VERSION", "1.0.0");

// whether the script is in demo mode
define("U_IS_DEMO", false);

// date/time formats
define("PHP_DATE_FORMAT", "d/m/Y");
define("PHP_TIME_FORMAT", "H:i:s");
define("PHP_DATETIME_FORMAT", PHP_DATE_FORMAT . ' ' . PHP_TIME_FORMAT);
define("JS_DATE_FORMAT", "dd/mm/yy");

// some error reporting
error_reporting(0);
ini_set('display_errors', 'Off');

// paths
if(!defined("U_ROOT"))
{
    define("U_INSTALL_DIR", "login");
    define("U_ROOT", dirname(__FILE__));
    define("DS", DIRECTORY_SEPARATOR);
}
define("U_PATH", str_replace(U_INSTALL_DIR.'/', '', U_ROOT . DS . U_INSTALL_DIR . DS).U_INSTALL_DIR.DS);
define("U_HTACCESS_PATH", str_replace(U_INSTALL_DIR.DS, '', U_ROOT . DS).'.htaccess');

// figure out path to login script
define("U_SCRIPT_ROOT_URL", U_FULL_PAGE_URL.U_INSTALL_DIR.'/');

// files/folders to exclude on the file permission browser
define("FILE_PERMISSIONS_EXCLUDED_ITEMS", U_INSTALL_DIR.'|uAuth.php|.htaccess');

// default index filename
define("U_DEFAULT_INDEX_PAGE", "index.php");

// start/get the session
session_start();

// database connectivity
include_once(U_PATH.'uDatabase.class.php');

// function library
include_once(U_PATH.'uFunctionLibrary.class.php');

// user class
include_once(U_PATH.'uUser.class.php');

// config class
include_once(U_PATH.'uConfig.class.php');

// file permission class
include_once(U_PATH.'uFilePermission.class.php');

// permission class
include_once(U_PATH.'uPermission.class.php');

// load the db configuration settings into constants so they'e easier to use
uConfig::loadAllAsConstants();

Na mijn weten alles correct toch krijg ik een 404 error

INSTALLATION:

The script is designed to integrate with your existing codebase so it should be installed in the root on your site. All the important files are contained within the login folder, excluding the uAuth.php file which is in the parent folder.

NOTE: Be carefull when installing the script. It's bundled with a number of demo scripts which may have the same filename as your existing code. If you don't need the demo, exclude the following files on install:

- /demo_admin_only.php
- /demo_admin_only_image.php
- /demo_logged_in_only.pdf
- /demo_logged_in_only.php
- /index.php


INSTALL GUIDE:

- Unpack and upload the script package.
- CHMOD /.htaccess to 666 once the files are uploaded.
- Within 'login/uConfig.inc.php' set the following:
- DATABASE_HOST - Your database hostname
- DATABASE_USER - Your database username
- DATABASE_PASS - Your database password
- DATABASE_NAME - Your database name
- U_FULL_PAGE_URL - The full web path to the 'login' folder. Include the http:// and exclude the login folder. End with forward slash
- U_SENDERS_EMAIL_ADDRESS - A valid email address to send script emails from

- Setup a new Mysql database on your hosting with the details you've set as above.
- Import the database structure into your DB - located in "/offline/database.sql"
- Navigate to the script root to view the demo page or "/login/" for the login screen.
- Default admin user is:
- user: admin_user
- pass: password

- Your done!

You are now ready to assign permissions to your files. Login to the script as admin for more details.


SUPPORT:

- Your purchase of the script includes full support from MFScripts.com. If you need any help at any time, feel free to check out the support forums on mfscripts.com or contact us via support@mfscripts.com.


SCRIPT REQUIREMENTS:

- PHP5+
- MySQL
- Mod-Rewrite enabled (for basic authentication method)

Ziet iemand wat ik verkeert doe ?

Graag advies
 
define("U_FULL_PAGE_URL", "http://wonderful-story/world_quiz_game\");

volgens mij gaat het hier al fout. de laatste slash is verkeerd, tenzij dat specifiek zo is aangegeven in een voorbeeld of iets dergelijks.
 
<?php // user management config include_once('uConfig.inc.php'); // redirect to login page uFunctionLibrary::redirect('uLogin.php');

Nou uLogin staat er echt in
 
Wat bedoel je?
Wampier zeg dat de \ in:
define("U_FULL_PAGE_URL", "http://wonderful-story/world_quiz_game\");
er niet thuis hoort of een / moet zijn.
 
Laatst bewerkt:
Beste

PHP:
<?php

/**
 * SCRIPT CONFIGURATION
 */

// the login site name. Appears in the title section.
define("LOGIN_SITE_NAME", "User Login & Management System");

// database connection details
define("DATABASE_HOST", "localhost"); // replace your-host-here.com with your db hostname
define("DATABASE_USER", "*****_jeroen"); // replace db_user with your db username
define("DATABASE_PASS", "*****"); // replace db_pass with your db password
define("DATABASE_NAME", "****_user"); // replace db_name with your db name

// front end path to the root of your site. i.e. the same folder the 'login' directory and 'uAuth.php' files appear in
define("U_FULL_PAGE_URL", "http://wonderful-story/world_quiz_game\");

// email address to send from
define("U_SENDERS_EMAIL_ADDRESS", "jeroensdesign@hotmail.com");

/**
 * END OF EDITABLE CONFIGURATION VALUES. YOU GENERALLY WONT NEED TO EDIT ANYTHING BELOW HERE
 */

// script version number
define("U_SCRIPT_VERSION", "1.0.0");

// whether the script is in demo mode
define("U_IS_DEMO", false);

// date/time formats
define("PHP_DATE_FORMAT", "d/m/Y");
define("PHP_TIME_FORMAT", "H:i:s");
define("PHP_DATETIME_FORMAT", PHP_DATE_FORMAT . ' ' . PHP_TIME_FORMAT);
define("JS_DATE_FORMAT", "dd/mm/yy");

// some error reporting
error_reporting(0);
ini_set('display_errors', 'Off');

// paths
if(!defined("U_ROOT"))
{
    define("U_INSTALL_DIR", "login");
    define("U_ROOT", dirname(__FILE__));
    define("DS", DIRECTORY_SEPARATOR);
}
define("U_PATH", str_replace(U_INSTALL_DIR.'/', '', U_ROOT . DS . U_INSTALL_DIR . DS).U_INSTALL_DIR.DS);
define("U_HTACCESS_PATH", str_replace(U_INSTALL_DIR.DS, '', U_ROOT . DS).'.htaccess');

// figure out path to login script
define("U_SCRIPT_ROOT_URL", U_FULL_PAGE_URL.U_INSTALL_DIR.'/');

// files/folders to exclude on the file permission browser
define("FILE_PERMISSIONS_EXCLUDED_ITEMS", U_INSTALL_DIR.'|uAuth.php|.htaccess');

// default index filename
define("U_DEFAULT_INDEX_PAGE", "index.php");

// start/get the session
session_start();

// database connectivity
include_once(U_PATH.'uDatabase.class.php');

// function library
include_once(U_PATH.'uFunctionLibrary.class.php');

// user class
include_once(U_PATH.'uUser.class.php');

// config class
include_once(U_PATH.'uConfig.class.php');

// file permission class
include_once(U_PATH.'uFilePermission.class.php');

// permission class
include_once(U_PATH.'uPermission.class.php');

// load the db configuration settings into constants so they'e easier to use
uConfig::loadAllAsConstants();


Hierbij wil ik laten weten dat ik het uiteraad verbeterd heb maar nu kreeg ik deze melding

<?php // user management config include_once('uConfig.inc.php'); // redirect to login page uFunctionLibrary::redirect('uLogin.php');

Hierbij mijn excusses voor het misverstand
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan