오늘은 대한입니다.
sun's longitude:300 08 41.38 
· 자유게시판 · 묻고답하기 · 알파문서 · RPMS list
· 사용자문서 · 팁/FAQ모음 · 리눅스Links · 자료실
· 서버정보 · 운영자 · Books/FAQ · FreeBSD
/board/read.php:소스보기  

질문과 답변 게시판입니다.

현재 실시간으로 이곳 서버의 설정파일(몇개)를 보여주고 있습니다.
서버의 설정내용에 관한 질문은 먼저 이곳 서버의 설정내용을 참고하시길 바랍니다.

[*** 쓰기 금지단어 패턴 ***]
글 본문 중간에 업로드할 이미지를 추가하는 방법 : @@이미지이름@@
ex) @@foo.gif@@
1122 번 글의 답장글: Re: 섹션변수를 읽을 수가 없는건지 안되는 건지모르겠읍니다.
글쓴이: 산이 [홈페이지] 글쓴날: 2002년 07월 31일 17:47:12 수(오후) 조회: 662
답변이 늦었습니다.

test.php의 내용은 아래와 같읍니다. 
<? 
// 세션의 초기화 
session_start(); 

// 설정 값이 먼저와야 합니다.
$num_of_tries = "1"; 
$guessed_chars = "2"; 
$word = "fail"; 

// 변수를 등록한다. 
session_register("num_of_tries"); 
session_register("guessed_chars"); 
session_register("word"); 
?>

<? 
session_start(); 

echo session_id(); // 또는 $PHPSESSID

// 아래와 같이 $_SESSION["세션변수이름"];

echo $_SESSION["num_of_tries"];

// 또는 $HTTP_SESSION_VARS["세션변수이름"]

?> 


그리고 /tmp 디렉토리에 'sess_세션ID이름'
 파일이 있는지 확인해 보세요.
이런 파일이 없으면 세션으로 등록되지 않은 경우입니다.

아래에 마침 간단한 예제가 있군요.
http://www.phpschool.com/bbs2/inc_view.html?id=3528&code=tnt2

===========================================

[darkrabbit]님이 남기신 글:

>안녕하세요. 
>다름이 아니라 섹션에서 해결하지 못하고있는 문제가 있어서
이렇게 도움을 요청합니다. 
>리눅스에서 섹션은 /tmp 및에 생성은 되는데, 섹션 변수값을
불러오면 아무것도 나오지 않습니다. 
>=============================================================test.php 
>test.php의 내용은 아래와 같읍니다. 
><? 
>// 세션의 초기화 
>session_start(); 
>
>// 변수를 등록한다. 
>
>session_register("num_of_tries"); 
>
>session_register("guessed_chars"); 
>
>session_register("word"); 
>
>$num_of_tries = "1"; 
>$guessed_chars = "2"; 
>$word = "fail"; 
>
>?> 
>=============================================================testresult.php

>testresult.php의 내용은 다음과 같습니다 
><? 
>session_start(); 
>
>echo " 
>    $num_of_tries  <br> 
>             $guessed_chars  <br> 
>             $word  <br>"; 
>
>?> 
>====================================================================php.ini

>참고로 저의 php.ini 파일의 섹션 설정부분은 아래와 같읍니다.

>[Session] 
>session.save_handler      = files   ; handler used to store/retrieve data

>session.save_path         = /tmp    ; argument passed to save_handler 
>                                    ; in the case of files, this is the

>                                    ; path where data files are stored 
>session.use_cookies       = 1       ; whether to use cookies 
>session.name              = PHPSESSID 
>                                    ; name of the session 
>                                    ; is used as cookie name 
>session.auto_start        = 0       ; initialize session on request startup

>session.cookie_lifetime   = 600       ; lifetime in seconds of cookie 
>                                    ; or if 0, until browser is restarted

>session.cookie_path       = /       ; the path the cookie is valid for 
>session.cookie_domain     =        ; the domain the cookie is valid for

>session.serialize_handler = php     ; handler used to serialize data 
>                                    ; php is the standard serializer of PHP

>session.gc_probability    = 100       ; percentual probability that the

>                                    ; 'garbage collection' process is started

>                                    ; on every session initialization 
>session.gc_maxlifetime    = 1440    ; after this number of seconds, stored

>                                    ; data will be seen as 'garbage' and

>                                    ; cleaned up by the gc process 
>session.referer_check     =         ; check HTTP Referer to invalidate 
>                                    ; externally stored URLs containing ids

>session.entropy_length    = 0       ; how many bytes to read from the file

>session.entropy_file      =         ; specified here to create the session id

>; session.entropy_length    = 16 
>; session.entropy_file      = /dev/urandom 
>session.cache_limiter     = nocache ; set to {nocache,private,public} to

>                                    ; determine HTTP caching aspects 
>session.cache_expire      = 1     ; document expires after n minutes 
>session.use_trans_sid     = 1       ; use transient sid support if enabled

>                                    ; by compiling with --enable-trans-sid

>url_rewriter.tags         =
"a=href,area=href,frame=src,input=src,form=fakeentr 
>y" 
>========================================================================

>도저히 무엇이 잘못된건지 알 수가 없군요. 
>무지한 저에게 한가닥 희망을 주시면 감사하겠읍니다.
 
>
>배파판은 wowlinux 7.1 입니다. 

========================================

 
이전글 : 섹션변수를 읽을 수가 없는건지 안되는 건지모르겠읍니다.
다음글 : 메일을 받기만 하게 할려면 어찌 하나요.  
 from 211.49.50.103
JS(Redhands)Board 0.4 +@

섹션변수를 읽을 수가 없는건지 안되는 건지모르겠읍니다. 메일을 받기만 하게 할려면 어찌 하나요.
인쇄용 


apache lighttpd linuxchannel.net 
Copyright 1997-2026. linuxchannel.net. All rights reserved.

Page loading: 0.03(server) + (network) + (browser) seconds