/home/mjc1/public_html/html/ezpos/html/member/cookie_test.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?
error_reporting
(E_ALL);
ini_set("display_errors"1);
/* jyh 디버깅 함수 */
function prt($data=null$size=0) {
    
//if (!isdev()) return;
    
ob_start();
    
print_r($data);
    
$content_text ob_get_contents();
    
ob_end_clean();
    
$content_list explode("\n"$content_text);
    
$rows count($content_list);
    
$cols 0;
    foreach (
$content_list as $line) {
        if ((
$col mb_strlen($line)) > $cols) {
            
$cols $col;
            if (
$cols 128$rows++;
        }
    }
    
$rows += 2;
    
$cols += 2;
    if (!
headers_sent()) {
        
header('Content-type: text/html; charset=euc-kr');
    }
    echo 
'<textarea cols="' $cols '" rows="' $rows '"';
    echo 
' style="display:block; margin:0; padding:5px; border:1px solid #999;';
    if (
$size) echo ' width:' $size 'px;';
    echo 
' font-family:Hwsr_9pt, Gulimche; font-size:9pt;">';
    echo 
$content_text;
    echo 
'</textarea>';
}


setcookie("id""jyh"time() + 36000);

prt($_COOKIE);    
?>