<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[TNF : Tatter Network Foundation forum - 냐하.. php하나만 질문할게요..ㅠ]]></title>
	<link rel="self" href="http://forum.tattersite.com/ko/extern.php?action=feed&amp;tid=1892&amp;type=atom"/>
	<updated>2006-11-03T02:01:26Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.tattersite.com/ko/viewtopic.php?id=1892</id>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=11005#p11005"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>laziel 작성:</cite><blockquote><p>foreach($_COOKIE as $key=&gt;$value) { ${$key} = $value; }</p></blockquote></div><p>조~금 더 붙이면;;</p><p>요건 extract($_COOKIE); 로 써도 되요. <img src="http://forum.tattersite.com/ko/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Peris]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=40</uri>
			</author>
			<updated>2006-11-03T02:01:26Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=11005#p11005</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=11003#p11003"/>
			<content type="html"><![CDATA[<p>이왕 강좌 분위기 된 김에.. 조금 덧붙이자면;</p><p>되도록 register_globals = off 를 전제하고 코드를 짜시는 것이 좋습니다. 처음에 습관들이기가 뭣해서 그렇지, 익숙해지고 나면 나중에 코드 알아보기도 쉽고 (이게 쿠키값인지, POST값인지..), 서버의 register_globals 설정 차이로 곤란해지는 일은 없게 됩니다 <img src="http://forum.tattersite.com/ko/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>정~ 일일히 써주시기 귀찮다면 이렇게 취급하는 방법도 있습니다.<br />foreach($_COOKIE as $key=&gt;$value) { ${$key} = $value; }<br />이걸 첫 줄에 넣어두면&nbsp; $_COOKIE[&#039;theme&#039;] = &#039;asdf&#039;; 가 $theme = &#039;asdf&#039;; 가 됩니다.<br />다만 이것은 잠깐 편리하긴 하지만 썩 좋은 방법은 아닙니다. (여러가지 측면에서..)</p><p>앞에서도 말씀드렸던 것 처럼 register_globals = off 환경을 전제로 제대로! <br />변수를 써주시는 습관을 들이시는게 좋습니다 <img src="http://forum.tattersite.com/ko/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[laziel]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=21</uri>
			</author>
			<updated>2006-11-03T01:48:09Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=11003#p11003</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=11001#p11001"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Peris 작성:</cite><blockquote><p>쿠키는 $_COOKIE[&#039;theme&#039;] ~~</p><p>PHP 설정에서 register_globals가 off로 되어있으면 전부 저런식($_GET, $_POST, $_SERVER, $_SESSION, $_COOKIE 등등)으로 받아야 한답니다.<br />(참고로 최근 PHP의 기본 설정은 off임)</p><p>... 근데 갑자기 왠 PHP 강좌가.. T_T</p></blockquote></div><p>아..&nbsp; register_globals 이게 변수 군요!<br />고맙습니다.</p>]]></content>
			<author>
				<name><![CDATA[LonnieNa]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=9</uri>
			</author>
			<updated>2006-11-03T01:39:30Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=11001#p11001</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=10999#p10999"/>
			<content type="html"><![CDATA[<p>쿠키는 $_COOKIE[&#039;theme&#039;] ~~</p><p>PHP 설정에서 register_globals가 off로 되어있으면 전부 저런식($_GET, $_POST, $_SERVER, $_SESSION, $_COOKIE 등등)으로 받아야 한답니다.<br />(참고로 최근 PHP의 기본 설정은 off임)</p><p>... 근데 갑자기 왠 PHP 강좌가.. T_T</p>]]></content>
			<author>
				<name><![CDATA[Peris]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=40</uri>
			</author>
			<updated>2006-11-03T01:24:28Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=10999#p10999</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=10995#p10995"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>Peris 작성:</cite><blockquote><p>설마 $_GET[&#039;sitetheme&#039;] 로 안받았다던지~</p></blockquote></div><p>우~ 이렇게 하니 쿠키는 구워지네요.</p><p>Name&nbsp; &nbsp; theme<br />Value&nbsp; &nbsp; theme1<br />Host&nbsp; &nbsp; tattersite.com<br />Path&nbsp; &nbsp; /<br />Secure&nbsp; &nbsp; No<br />Expires&nbsp; &nbsp; 2006년 12월 3일 일요일 오전 9:28:37</p><p>근데 메인 index.php에서 구워진 쿠키가 안읽혀지는..=_+<br />저 Value의 thema1값을 읽어오려면 어찌해야하죠? ㅜ</p><p>잘 되던게 안되니 답답할따름..</p>]]></content>
			<author>
				<name><![CDATA[LonnieNa]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=9</uri>
			</author>
			<updated>2006-11-03T00:53:39Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=10995#p10995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[RSS 답글: 냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=10992#p10992"/>
			<content type="html"><![CDATA[<p>설마 $_GET[&#039;sitetheme&#039;] 로 안받았다던지~</p>]]></content>
			<author>
				<name><![CDATA[Peris]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=40</uri>
			</author>
			<updated>2006-11-03T00:08:48Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=10992#p10992</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[냐하.. php하나만 질문할게요..ㅠ]]></title>
			<link rel="alternate" href="http://forum.tattersite.com/ko/viewtopic.php?pid=10970#p10970"/>
			<content type="html"><![CDATA[<p>php 책 본지 1년이 넘어가지만..</p><p>지금, 이전에 보신 메뉴얼을 tattersite에 올려두었습니다.<br />근데 테마기능이 작동을 안하는게..<br />테마를 변경해주는 thema.php 파일에</p><p>theme.php?sitetheme=theme1</p><p>이렇게 넘겨받으면 자꾸 &quot;테마적용오류&quot; 만 뜨는게..<br />제 부족한 머리로 쫘낸 분석결과는..<br />$sitethema 에 thema1 값이 안들어가는것 같아 그런것 같습니다.<br />아래는 thema.php 코드입니다.<br /></p><div class="codebox"><pre><code>&lt;?
 if ( ($sitetheme == &#039;theme1&#039;) || ($sitetheme == &#039;theme2&#039;) || ($sitetheme == &#039;theme3&#039;) || ($sitetheme == &#039;theme4&#039;) ) {
 SetCookie (&quot;theme&quot;,$sitetheme,time()+2592000,&quot;/&quot;,&quot;.tattersite.com&quot;);
 $org_url = getenv(&quot;HTTP_REFERER&quot;);
 HEADER (&quot;Location: $org_url&quot;);
} else echo &quot;테마적용오류&quot;;
?&gt;</code></pre></div><p>이게 제 계정에선 잘 되던거였거든요.<br />tattersite로 옮기고나선 안되네요.</p>]]></content>
			<author>
				<name><![CDATA[LonnieNa]]></name>
				<uri>http://forum.tattersite.com/ko/profile.php?id=9</uri>
			</author>
			<updated>2006-11-02T13:51:29Z</updated>
			<id>http://forum.tattersite.com/ko/viewtopic.php?pid=10970#p10970</id>
		</entry>
</feed>
