Router::url('/', true) . 'img/example.png' (cakephp 2)
// localhost/domain/event/detail
$current_url = $this->request->here();
// => /domain/event/detail
echo $this->Html->link(__('<i class="fas fa-icons"></i>'), array(
'plugin' => 'building',
'controller' => 'service_icons',
'action' => 'index',
'?building_post_id=' . $buildingPost['BuildingPost']['id']), array('class' => 'btn btn-info btn-xs', 'escape' => false, 'data-toggle'=>'tooltip', 'title' => __d('building', 'add_service_icon')));
// output
// http://localhost/paragonasia-portal/admin/building/service_icons/index/?building_post_id=16
// ------------------------------------
// ------------ one OR --------------
// ------------------------------------
$conditions = array(
'OR' => array(
array( 'MemberRole.school_id' => array()),
array( 'MemberRole.role_id' => $role),
);
);
// ------------------------------------
// ------------ multiple OR --------------
// ------------------------------------
'OR' => array(
array(
'MemberRole.school_id' => array(),
'MemberRole.role_id' => $role,
),
array(
'MemberRole.school_id' => array(),
'MemberRole.role_id' => Environment::read('role.register'),
),
array(
'MemberRole.school_id' => $school_id,
'MemberRole.role_id' => Environment::read('role.register'),
),
array(
'MemberRole.school_id' => $school_id,
'MemberRole.role_id' => $role
)
)
1. Add .htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
2. Add Permission tmp, Vendor, Webroot
- Window Set permisson
- Linux Set chmod -R 777