���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/tie.cx/app/models/Page.php
���ѧ٧ѧ�
<?php namespace Altum\Models; class Page extends Model { public function get_pages($position) { $data = []; $cache_instance = \Altum\Cache::$adapter->getItem('pages_' . $position); /* Set cache if not existing */ if(is_null($cache_instance->get())) { $result = database()->query("SELECT `url`, `title`, `type` FROM `pages` WHERE `position` = '{$position}' ORDER BY `order`"); while($row = $result->fetch_object()) { if($row->type == 'internal') { $row->target = '_self'; $row->url = url('page/' . $row->url); } else { $row->target = '_blank'; } $data[] = $row; } \Altum\Cache::$adapter->save($cache_instance->set($data)->expiresAfter(86400)); } else { /* Get cache */ $data = $cache_instance->get(); } return $data; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�