$('[name=mobile]').on('keyup', function() {
$(this).val( $(this).val().replace(/[^0-9]/g, "").replace(/(^02|^0505|^1[0-9]{3}|^0[0-9]{2})([0-9]+)?([0-9]{4})/,"$1-$2-$3").replace("--", "-") );
});

Smarty 문법 PHP 2019. 7. 16. 09:26

foreach문의 첫번째 index 

 

{foreach from=$main_banner_list.keyword_list item=keyword name=keywords}

$smarty.foreach.keywords.first

{/foreach}

이메일주소 체크

 

var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if(!filter.test($(#email).val())) {
alert('잘못된 이메일 주소입니다.');
return false;
}

1
2
3
4
5
6
7
8
9
10
11
12
$.ajax({
    type : 'POST',
    url : url,
    data : {
        'cols':value
    },
    async: false,
    dataType : 'json',
    success: function(json) {
        console.log(json);
    }
});
cs

 

async를 false로 설정하면됨.

그럼 코드가 실행완료 되기 전까지 다음 코드로 넘어가지 않

Google analytics etc 2019. 4. 19. 10:38
웹 서비스 보안 설정 etc 2019. 4. 17. 09:47

* 아파치

httpd.conf에서 

 

#Hide the Apache Version

ServerSignature off

ServerTokens Prod

 

 

* PHP

php.ini에서

 

expose_php = Off 

 

 

 

덤프 백업 및 복구 Mysql 2013. 1. 15. 10:38


mysqldump -u사용자 -p비밀번호 DB명 테이블명 > 파일명

 : --default-character-set=euckr 캐릭터셋이 euckr인 경우


mysql -u사용자 -p비밀번호 DB명 < 파일명

[mysqld]
slave-skip-errors = 1062


[mysql shell command에서 아래를 실행]
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; 

START SLAVE;



$after2day = date("Ymd", strtotime("+2 days", strtotime($view_edate)));

$('sel').options[$('sel').selectedIndex].text;
$('sel').options[$('sel').selectedIndex].value;


맨날 까먹네 -_ -