PHP開發框架 Flourish

fmms 12年前發布 | 16K 次閱讀 PHP Web框架

Flourish是一個面向對象的PHP開發框架。它擁有一個模塊化的架構,這意味著它沒有嚴格遵循MVC模式。它支持多種數據包括:MySQL、PostgreSQL、SQLite、MSSQL、Oracle、DB2。具有安全,易于使用,易于操作圖片的特點。

示例代碼:

// Connect to our SQLite database
fORMDatabase::attach(new fDatabase('sqlite', '/path/to/database'));

// Create an object to represent rows in the database
class User extends fActiveRecord {
    // Return an iterable set of User objects
    public static function findActive() {
        return fRecordSet::build(
            'User',                            // Make User objects
            array('status=' => 'Active'),      // That are active
            array('date_registered' => 'desc') // Ordered by registration date
        );
    }
}

// Loop through and display the users' names
foreach (User::findActive() as $user) {
    echo $user->prepareFirstName() . ' ' . $user->prepareLastName() . '
';
}

項目主頁:http://www.baiduhome.net/lib/view/home/1335678012687

 本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!