Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Utorok, 19. marec 2024
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Dokumentácia  »  HTML  »  General options

Chapter 3. General options

Open the script in your text editor. No HTML header or footer is created, thus you may want to include a header at the top of the script, and include a footer at the end of the script.

3.1. Database connection

Various options are configured near the top of the script, most notably the database logon. For security reasons, you may want to copy/paste the logon options to a separate, included file.

MySQL logon options host name, user name, password, database, and table appear in the following format.

Example 3-1. Database connection options

$opts['hn'] = 'localhost';
$opts['un'] = 'username';
$opts['pw'] = 'password';
$opts['db'] = 'database';
$opts['tb'] = 'table';

Recommended usage is, that the first four options shown above should be moved to a separate, included file.

It is a rather common situation to use phpMyEdit inside larger project. To prevent phpMyEdit from creating an additional persistent database connection, supply the $opts['dbh'] option. In the example below, $your_project_db_handle represents a previously allocated MySQL database handle. When $opts['dbh'] is specified, the first four options appearing above are ignored.

Example 3-2. Supplying allocated connection

$opts['dbh'] = $your_project_db_handle;


Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov