function fnMsToTime(duration) {
    var milliseconds = parseInt((duration%1000)/100)
        , seconds = parseInt((duration/1000)%60)
        , minutes = parseInt((duration/(1000*60))%60)
        , hours = parseInt((duration/(1000*60*60))%24)
        , days = parseInt(duration/(1000*60*60*24));
    hours = (hours < 10) ? "0" + hours : hours;    minutes = (minutes < 10) ? "0" + minutes : minutes;    seconds = (seconds < 10) ? "0" + seconds : seconds;
    return days + "일 " + hours + "시간 " + minutes + "분 " + seconds + "초 " + milliseconds + ' 남음';}




http://hangaebal.blogspot.kr/2015/07/javascript-milliseconds-to-time-string.html


I making cakephp 3.0 web app.

I want to cakephp exclude url for static html folder.


/app/webroot/exclude/some.html


/app/.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine on    RewriteRule    ^$    webroot/    [L]    RewriteRule    (.*) webroot/$1    [L]</IfModule>


webroot/.htaccess

<IfModule mod_rewrite.c>
    RewriteEngine On    RewriteCond %{REQUEST_URI} !^/exclude/(.*) # add this Line on default    RewriteCond %{REQUEST_FILENAME} !-f    RewriteRule ^ index.php [L]</IfModule>


참고 :
http://stackoverflow.com/questions/2249885/cakephp-htaccess-mod-rewrite-configuration-to-exclude-a-particular-folder-url






http://hangaebal.blogspot.kr/2015/07/cakephp-htaccess-modrewrite-edit-for.html


PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)

php.ini

upload_max_filesize = 32M
post_max_size = 32M

then httpd restart


http://stackoverflow.com/questions/13442270/ini-setupload-max-filesize-200m-not-working-in-php







http://hangaebal.blogspot.kr/2015/06/php-increase-max-upload-size-wordpress.html



cakephp3 Permission denied error




/etc/apache2/envvars

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.

##export APACHE_RUN_USER=www-data
##export APACHE_RUN_GROUP=www-data
## 아파치 유저 변경
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data


service apache restart









http://hangaebal.blogspot.kr/2015/06/apache-change-run-user-group.html


/etc/apache2/sites-available/default


<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>
<Directory /var/www>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order Allow,Deny
    Allow from all
</Directory>

참고 :
http://book.cakephp.org/3.0/en/installation.html#url-rewriting







http://hangaebal.blogspot.kr/2015/06/cakephp-not-found-requested-url-apache.html

+ Recent posts