ASISG

Gy - php framework/CMS | Documentation | Database usage PhpFileSql

<-- table of contents

Database usage PhpFileSql

It is necessary to set in the configuration file (\gy\config\gy_config.php):

'db_type' => 'PhpFileSqlClientForGy',
'db_host' => 'localhost',
'db_url' => path to the place where the database file will be stored
'db_user' => ...
'db_pass' => ...
'db_name' => ...

Need to take a class file https://github.com/ssv32/PhpFileSql/blob/master/htdocs/classes/PhpFileSql.php from here /customDir/classes/ PhpFileSql DB code itself is not part of the gy php framework). (in the commite 622198e6694c00584d7ac2223cd7ef519a21349f from a branch add_db_PhpFileSql there is an example where everything is already added, but the database file is in the section /customDir/db/ what is not recommended, it is better to store outside the web space as indicated here https://github.com/ssv32/PhpFileSql )

Next, create a database of how to do this, see here https://github.com/ssv32/PhpFileSql .

Next, install the database data with the script /gy/install/installDataBaseTable.php (*2. Gy install db from mysql*).

Everything, gy php framework already uses PhpFileSql in work.




View documentation on GitHub.com