울라프

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,617
2년 전 조회 2,992
2년 전 조회 1,943
2년 전 조회 1,586
3년 전 조회 1,936
3년 전 조회 2,447
3년 전 조회 1,924
3년 전 조회 2,176
3년 전 조회 2,683
3년 전 조회 2,109
3년 전 조회 2,578
3년 전 조회 2,482
3년 전 조회 3,674
3년 전 조회 3,231
3년 전 조회 1,614
3년 전 조회 2,006
3년 전 조회 2,307
3년 전 조회 2,399
3년 전 조회 2,118
3년 전 조회 2,499
3년 전 조회 3,592
3년 전 조회 2,705
3년 전 조회 2,723
3년 전 조회 2,211
3년 전 조회 2,892
3년 전 조회 2,637
3년 전 조회 1,994
3년 전 조회 2,653
3년 전 조회 1,621
3년 전 조회 1,958