Article View: pl.comp.lang.php
Article #230558Re: $GLOBALS, Undefined index
From: Lemat
Date: Wed, 10 Sep 2014 14:48
Date: Wed, 10 Sep 2014 14:48
34 lines
1731 bytes
1731 bytes
jivanmukta@poczta.onet.pl wrote: > Uczę się PHP5. Korzystam z PHP Version 5.3.10-1ubuntu3.13 na localhoście. > Mam zmienną $client_name o wartości "Janko Muzykant". > Dlaczego następujący kod: > > echo 'client_name:';var_dump($client_name); > echo 'GLOBALS:';var_dump($GLOBALS['client_name']); > > wyświetla mi: > > client_name:string(14) "Janko Muzykant" > GLOBALS: > A PHP Error was encountered > Severity: Notice > Message: Undefined index: client_name > Filename: announcement/form.php > Line Number: 4 > NULL > > Myślałem że wyświetli się: > > client_name:string(14) "Janko Muzykant" > GLOBALS:string(14) "Janko Muzykant" > > Proszę o pomoc. Mam jeszcze małe doświadczenie. a $client_name jest zmienną globalną czy lokalną? -- Pozdrawiam Lemat www.lemat.priv.pl
Technical Details
Message-ID:
<541064ac$0$26848$65785112@news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!feed.news.qwest.net!mpls-nntp-03.inet.qwest.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mailReferences:
<fd339485-358a-4935-af62-89aaa8a646ad@googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!feeder.erje.net!eu.feeder.erje.net!feed.news.qwest.net!mpls-nntp-03.inet.qwest.net!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail From: Lemat <#@lemat.priv.pl> Organization: lemat.priv.pl Date: Wed, 10 Sep 2014 16:48:20 +0200 User-Agent: KNode/4.13 Subject: Re: $GLOBALS, Undefined index Newsgroups: pl.comp.lang.php References: <fd339485-358a-4935-af62-89aaa8a646ad@googlegroups.com> MIME-Version: 1.0 Lines: 34 Message-ID: <541064ac$0$26848$65785112@news.neostrada.pl> NNTP-Posting-Host: 79.189.200.118 X-Trace: 1410360492 unt-rea-a-02.news.neostrada.pl 26848 79.189.200.118:60831 X-Complaints-To: abuse@news.neostrada.pl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit