__FRAMEWORK__ - kouji6309/SingleMVC GitHub Wiki
框架檔案所在位置。定義成框架的 __FILE__。
用程式碼更新框架時,可以複寫原來的框架檔案,通常搭配 check_for_updates 使用
public function update() {
if (($r = check_for_updates(true)) && $r['result'] < 0) {
if (file_put_contents(__FRAMEWORK__, $r['file'])) {
output('text', 'Framework has been updated.');
} else {
output('text', 'Unable to update framework.');
}
} else {
output('text', 'Framework is up-to-date.');
}
}