Article View: pl.comp.lang.php
Article #219750Re: jak zrezygnować ze zmiennych globalnych
From: M.
Date: Fri, 17 Jul 2009 22:31
Date: Fri, 17 Jul 2009 22:31
36 lines
1620 bytes
1620 bytes
| jak ci zależy to:
| 1. w pliku php.ini ustaw register_globals off
| 2. zamiast $menuid wpisz $_GET('menuid')
|
|
| --
| pozdrawiam,
|
| Krzysztof Warunek
|
| *In specialibus generalia quaerimus*
Witaj,
Dzięki za pomoc. Wyłączyłem zmienne globalne, podmieniłem pkt. 2, czyli
jest:
<?php
if (!isset($_GET('menuID')))
{ include('include/witamy.html'); }
else if ($_GET('menuID')=='witamy')
{ include('include/witamy.html'); }
else if ($_GET('menuID')=='statut')
{ include('include/statut.html'); }
else
{ include('include/error.html'); };
?>
ale efekt jest taki:
Parse error: syntax error, unexpected '(', expecting ',' or ')' in (...) on
line 2
Jakiś pomysł co źle ustawiłem?
M.
Technical Details
Message-ID:
<4a60fc6a$1@news.home.net.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!nf1.ipartners.pl!ipartners.pl!news.home.net.pl!not-for-mailReferences:
<4a60eb8f@news.home.net.pl> <h3qqpl$lab$1@inews.gazeta.pl>Show Full Headers
Complete Article Headers
From: "M." <no@spam> Newsgroups: pl.comp.lang.php References: <4a60eb8f@news.home.net.pl> <h3qqpl$lab$1@inews.gazeta.pl> Subject: Re: jak zrezygnować ze zmiennych globalnych Date: Sat, 18 Jul 2009 00:31:59 +0200 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 NNTP-Posting-Host: 82.210.177.12 Message-ID: <4a60fc6a$1@news.home.net.pl> X-Trace: news.home.net.pl 1247870058 82.210.177.12 (18 Jul 2009 00:34:18 +0200) Organization: home.pl news server X-Authenticated-User: news@cioff.pl Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!nf1.ipartners.pl!ipartners.pl!news.home.net.pl!not-for-mail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit