울라프

PHP 에서 사용하는 function console_log($data)

[code]

 

function console_log($data){
    echo "<script>console.log( 'PHP_Console: " . $data . "' );</script>";
}

$testVal = "테스트 데이터";
console_log($testVal);

 

 

[/code]

|

댓글 1개

//특수문자치환 버전 입니다.
function console_log($data){
$data = rawurlencode($data);
echo "<script>console.log( 'PHP_Console: '+decodeURIComponent('".$data ."') );</script>\n";
}
댓글을 작성하시려면 로그인이 필요합니다.

그누보드5 팁자료실

+
제목 글쓴이 날짜 조회
2년 전 조회 3,538
2년 전 조회 2,904
2년 전 조회 1,838
2년 전 조회 1,498
2년 전 조회 1,848
2년 전 조회 2,357
2년 전 조회 1,845
2년 전 조회 2,078
2년 전 조회 2,576
2년 전 조회 2,030
2년 전 조회 2,494
2년 전 조회 2,406
3년 전 조회 3,599
3년 전 조회 3,156
3년 전 조회 1,529
3년 전 조회 1,891
3년 전 조회 2,165
3년 전 조회 2,303
3년 전 조회 2,030
3년 전 조회 2,416
3년 전 조회 3,496
3년 전 조회 2,613
3년 전 조회 2,631
3년 전 조회 2,132
3년 전 조회 2,797
3년 전 조회 2,561
3년 전 조회 1,911
3년 전 조회 2,559
3년 전 조회 1,534
3년 전 조회 1,889