Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [SSI] Podstrony.
xomer
post 9.09.2003, 15:34:28
Post #1





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Nie wiedziałem z jakim dziale mam zamieścić sprawę związaną z SSI więc zamieściłem tutaj.

Chodzi mi o to żeby strone np.
r1.shtml
otwierało w
index.shtml?r1
Tu gdzie dałeś mi link niema takiego czegoś. Zna ktoś może skrypt albo komende o która ja prosze?

______

php >> Hydepark
Seth
Go to the top of the page
+Quote Post
adwol
post 9.09.2003, 15:49:35
Post #2





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 6.08.2003

Ostrzeżenie: (0%)
-----


Cytat
Chodzi mi o to żeby strone np.  
r1.shtml  
otwierało w  
index.shtml?r1

W samym SSI?
Kod
<!--#include file="${QUERY_STRING}.shtml" -->
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 15:57:12
Post #3





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


I na czym polega ten kod? Bo prubuje na serwerze i jakoś mi nie wychodzi sad.gif
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 16:02:32
Post #4





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Zrobiłem tak:
w index.shtml umieściłem kod ten co mi dałeś. Umieściłem też plik haha.shtml i umieściłem tam tekst: "HAHA". No i jak otwieram index.shtml?haha to sie otwiera tekst HAHA. A jak otwieram sam index.shtml to mi sie wyswietla
Cytat
[an error occurred while processing this directive]

Co może być nie tak? P.S. Mam konto na republice.
Go to the top of the page
+Quote Post
adwol
post 9.09.2003, 16:28:42
Post #5





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 6.08.2003

Ostrzeżenie: (0%)
-----


Cytat
No i jak otwieram index.shtml?haha to sie otwiera tekst HAHA. A jak otwieram sam index.shtml to mi sie wyswietla
Cytat
[an error occurred while processing this directive]

No i prawidłowo. Wtedy $QUERY_STRING jest pusty i on próbuje otworzyć plik .shtml, który pewnie nie istnieje. Musisz obłożyć to jakimś warunkiem.
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 17:57:53
Post #6





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


To znaczy? Mógłbyś mi coś poradzić bo na SSI to sie nieznam wogle a tej komendy znalezc nie moge ani informacji na jej temat. Więc co mi radzisz żeby sie niewyswietlal ten błąd?
Go to the top of the page
+Quote Post
adwol
post 9.09.2003, 18:02:05
Post #7





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 6.08.2003

Ostrzeżenie: (0%)
-----


Cytat
Mógłbyś mi coś poradzić bo na SSI to sie nieznam wogle a tej komendy znalezc nie moge ani informacji na jej temat.

http://httpd.apache.org/docs/mod/mod_include.html
Cytat
Więc co mi radzisz żeby sie niewyswietlal ten błąd?

Kod
<!--#if expr=""${QUERY_STRING}" != """ -->

<!--#include file="${QUERY_STRING}.html" -->

<!--#endif -->
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 18:11:17
Post #8





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Działa. Wielkie serdecznie dziex laugh.gif
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 18:42:31
Post #9





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Hihi, jeszcze jedno. Jak zrobić żeby strona główna znajdowala sie w pliku glowna.txt?
Go to the top of the page
+Quote Post
adwol
post 9.09.2003, 19:22:49
Post #10





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 6.08.2003

Ostrzeżenie: (0%)
-----


Cytat
Hihi, jeszcze jedno. Jak zrobić żeby strona główna znajdowala sie w pliku glowna.txt?

W konfigu apache'a:
Kod
DirectoryIndex glowna.txt

i ustawić handler rozszerzenia .txt na php.
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 20:27:35
Post #11





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Nie nie, chodzi mi o głowną. Np. Mam stronę i na środku jest ten kodzik (index.shtml?costam) to co zrobic zeby wyswietlalo na glownej plik glowna.shtml czy glowna.txt?

P.S. W republice niemam dostepu do apacha.
Go to the top of the page
+Quote Post
adwol
post 9.09.2003, 20:55:25
Post #12





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 6.08.2003

Ostrzeżenie: (0%)
-----


Cytat
Nie nie, chodzi mi o głowną. Np. Mam stronę i na środku jest ten kodzik (index.shtml?costam) to co zrobic zeby wyswietlalo na glownej plik glowna.shtml czy glowna.txt?

Teraz to przestałem rozumieć. Chcesz żeby zamiast index.shtml jak główny plik zwracało glowna.shtml, czy co?
Go to the top of the page
+Quote Post
xomer
post 9.09.2003, 22:12:56
Post #13





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Sorka, wytłumaczyłem strasznie nie zrozumiale.

Posiadam pełną strone w SSI (to znaczy logo, menu, stopka na dole itd...). W menu strony tej (index.shtml) mam opcje powiedźmy: Strona 1 (odsyłacz do index.shtml?1), Strona 2 (odsyłacz do index.shtml?2) itd... Klikając na link "Strona 1" otwiera mi sie na środku strony zawartość pliku 1.shtml. Menu, logo, stopka jest taka sama.

I ja chce żeby na stronie głównej (index.shtml) też była zawartość. Np.:
"Cześć! To jest strona główna!!!".

W php jest następująco:
[php:1:b9852d91c3]<?php
jakiś...tam...kod...

else
{
include("zawartosc_tekstu_strony_glownej.txt");
}
?>[/php:1:b9852d91c3]

A jak to jest w SSI? Tzn. jak przerobić ten kod co mi podałeś?
Go to the top of the page
+Quote Post
adwol
post 9.09.2003, 22:59:22
Post #14





Grupa: Zarejestrowani
Postów: 691
Pomógł: 0
Dołączył: 6.08.2003

Ostrzeżenie: (0%)
-----


Cytat
A jak to jest w SSI? Tzn. jak przerobić ten kod co mi podałeś?

O takie coś Ci chodzi?
Kod
<!--#if expr=""${QUERY_STRING}" != """ -->

<!--#include file="${QUERY_STRING}.html" -->

<!--#else -->

<!--#include file="glowna.shtml" -->

<!--#endif -->

Poczytaj ten link który Ci napisałem. Tam jest wszystko wytłumaczone.
Go to the top of the page
+Quote Post
xomer
post 10.09.2003, 08:11:01
Post #15





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 26.06.2003

Ostrzeżenie: (0%)
-----


Dokładnie o takie coś, dzieki za poświęcony czas smile.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 24.07.2025 - 12:42