This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^old_domain.com [NC,OR] | |
RewriteCond %{HTTP_HOST} ^www.old_domain.com [NC] | |
RewriteRule ^(.*)$ http://new_domain.net/$1 [L,R=301,NC] | |
RewriteRule ^$ webroot/ [L] | |
RewriteRule (.*) webroot/$1 [L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin support@your_domain.com | |
ServerName subdomain.your_domain.com | |
ServerAlias www.subdomain.your_domain.com | |
DocumentRoot /var/www/subdomain.your_domain.com | |
# your folder /var/www/subdomain.your_domain.com | |
<Directory /var/www/subdomain.your_domain.com> | |
Options Indexes FollowSymLinks MultiViews | |
DirectoryIndex index.php index.html | |
AllowOverride All |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name cakephp.org www.cakephp.org; | |
# root directive should be global | |
root /var/www/cakephp.org/webroot/; | |
index index.php; | |
access_log /var/www/cakephp.org/logs/nginx_access.log; | |
error_log /var/www/cakephp.org/logs/nginx_error.log; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\View\Widget; | |
use Cake\Core\Configure; | |
use Cake\I18n\I18n; | |
use Cake\View\Form\ContextInterface; | |
use Cake\View\Widget\BasicWidget; | |
/** | |
* Input widget class for generating a textarea control. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tinymce.init({ | |
forced_root_block: false, | |
relative_urls: false, | |
mode: "exact", | |
elements: "content", | |
theme: "modern", | |
height: 300, | |
plugins: ["advlist autolink link image lists charmap preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking", "table contextmenu directionality emoticons paste textcolor responsivefilemanager fullscreen"], | |
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect", | |
toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | fullscreen preview code ", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
/** | |
* Debug Level: | |
* | |
* Production Mode: | |
* false: No error messages, errors, or warnings shown. | |
* | |
* Development Mode: | |
* true: Errors and warnings shown. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Demo</title> | |
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
<script src="https://code.jquery.com/jquery-migrate-1.2.1.min.js"></script> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lưu ý: Việc cái nào nhúng vào cái nào chỉ là cách mình nói về 2 kiểu viết này | |
//1. nhúng php vào html | |
<?php foreach($products as $product):?> | |
<div class="product"> | |
<h3 class="title"><?= $product->title?></h3> | |
<div class="content"> | |
<p><?= $product->content?></p> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Shell\Task; | |
use Cake\Console\Shell; | |
use Cake\Core\Configure; | |
use Cake\ORM\TableRegistry; | |
/** | |
* DeleteExpiredInactiveAccountTask |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller\Admin; | |
use App\Controller\AppController; | |
use App\Controller\CheckProfile; | |
/** | |
* Dashboard Controller | |
* |