🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #231479

Re: Jak uzyskac ten sam adres URL

#231479
From: Lemat
Date: Sat, 05 Nov 2016 18:31
34 lines
1905 bytes
W dniu 05.11.2016 o 18:37, mwitkowski2b@gmail.com pisze:
> Proszę o poradę w jaki sposób uzyskać ten sam adres url, bez względu na aktywny skrypt. Mam stronę napisaną w php. Powiedzmy strona o nazwie: www.moja_strona
> Na starcie użytkownik widzi url:
> www.moja_strona/index.php
> jak wybiorę np. faktury w url wyświetla się:
> www.moja_strona/faktury.php
> itd.
> Chciałbym uzyskać taki efekt, żeby url był zawsze ten sam.
> www.moja_strona/index.php
> lub
> www.moja_strona

3 sposoby:

1) a parametr możesz dodawać?

no to http://cośtam/index.php?m=faktury lub
http://cośtam/?m=faktury

index.php:
<?PHP
if ($_GET['m']=='faktury')
	include('faktury.php');
?>

2) możesz umieścić stronę w ramce <iframe> lub <frameset>
i zmieniasz zawartość ramki <a target=ramka> zostawiając dokument główny 
bez zmian

3) możesz wczytywać fragmenty strony AJAXem

-- 
Pozdrawiam
Lemat
Technical Details
Message-ID: <581e255d$0$15191$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin2!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <a1abb764-ba31-457c-bedf-ab3e1d9cdf81@googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin2!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Subject: Re: Jak uzyskac ten sam adres URL
Newsgroups: pl.comp.lang.php
References: <a1abb764-ba31-457c-bedf-ab3e1d9cdf81@googlegroups.com>
From: Lemat <#@lemat.priv.pl>
Date: Sat, 5 Nov 2016 19:31:03 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <a1abb764-ba31-457c-bedf-ab3e1d9cdf81@googlegroups.com>
Lines: 34
Message-ID: <581e255d$0$15191$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 79.189.200.118
X-Trace: 1478370654 unt-rea-a-02.news.neostrada.pl 15191 79.189.200.118:56070
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit