울라프

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 팁자료실

+
제목 글쓴이 날짜 조회
3년 전 조회 3,731
3년 전 조회 3,098
3년 전 조회 2,067
3년 전 조회 1,695
3년 전 조회 2,041
3년 전 조회 2,605
3년 전 조회 2,034
3년 전 조회 2,293
3년 전 조회 2,815
3년 전 조회 2,198
3년 전 조회 2,675
3년 전 조회 2,606
3년 전 조회 3,823
3년 전 조회 3,383
3년 전 조회 1,737
3년 전 조회 2,134
3년 전 조회 2,447
3년 전 조회 2,546
3년 전 조회 2,248
3년 전 조회 2,606
3년 전 조회 3,724
3년 전 조회 2,818
3년 전 조회 2,835
3년 전 조회 2,321
3년 전 조회 2,991
3년 전 조회 2,737
3년 전 조회 2,100
3년 전 조회 2,803
3년 전 조회 1,720
3년 전 조회 2,064