Skip to content

Instantly share code, notes, and snippets.

View htakai's full-sized avatar

hiroyuki takai htakai

View GitHub Profile
<?php
/**
* news3データベース初期設定
*
* このファイルを使用しない方法として、以下のようなやり方もあります。
* sqlite3 では、データベースはファイルとして扱っているので、$dbfileで定義されているファイルをあらかじめ生成しておきます。
* Windows7 xampp v3.2.4環境では、ターミナルウィンドウを開いて、以下のように打ち込むとファイルが生成される。
* cd C:\xampp;
* mkdir data;
* cd data;
<?php
/**
* Dbクラスに読み込まれるdsn情報があるファイル(sqlite)
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2018/07/
*/
//読みこまれるdsn情報分だけ作成する $dsn1, $dsn2,..... $dbpath1, $dbpath2,.....
<?php
/**
* dt
*
* id integer primary key
* cat_id integer
* title text
* contents text
* img_id integer
<?php
/**
* dt
*
* id integer primary key
* cat_id integer
* title text
* contents text
* img_id integer
<?php
/**
* cat
*
* cat_id integer primary key AUTOINCREMENT
* cat_name TEXT
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2020/06/
*/
<?php
/**
* cat
*
* cat_id integer primary key AUTOINCREMENT
* cat_name TEXT
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2020/05/
*/
<?php
/**
* データベース接続操作クラス.
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2020/07/
*/
namespace framework3\mvc;
<?php
/**
* Data Access Object.
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2020/05/
*/
namespace framework3\mvc;
@htakai
htakai / DaoIterator.php
Created August 7, 2020 23:19
this is abstract class that use iterator for aplication
<?php
/**
* this is abstract class that use iterator for aplication .
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2020/07/
*/
namespace framework3\mvc;
@htakai
htakai / test-index3.php
Created October 11, 2019 14:26
test use template_2notag php file
<?php
/**
* aplication start file
*
* @author Hiroyuki Takai <watashitakai@gmail.com>
* @since 2018/07/
*/
require_once __DIR__ . '/../../news2/config.php';
require_once __DIR__ . '/../../framework2/runfirst.php';