Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> PHP na stronie glownej
johno
post
Post #1





Grupa: Zarejestrowani
Postów: 11
Pomógł: 0
Dołączył: 8.06.2002
Skąd: z Krakowowa

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


Mam taki maly problem.
Dopiero zaczynam z php. Wczesnier j programowalem w C++, Pascalu.
Czy jest jakis sposob na to, zeby umiescic skrypt php w pliku index.* (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Jesli jest index.html, to php nie zinterpretuje skryptu. Jesli jest index.php, to serwer nie bedzie chcial go altomatyczne otworzyc :cry:
Jakas rada?(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
hyper
post
Post #2





Grupa: Zarejestrowani
Postów: 207
Pomógł: 0
Dołączył: 7.03.2002
Skąd: Warszawa

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


Cytat
Jesli jest index.html, to php nie zinterpretuje skryptu. Jesli jest index.php, to serwer nie bedzie chcial go altomatyczne otworzyc


Istna herezja (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) (żartuje oczywiście)

Otwieranie domyślnego pliku index dla katalogu to zadanie serwera WWW
i to właśnie w jego konfiguracji możesz ustawić, żeby ładował index.php
jako strone domyślną.

Na przykładzie serwera Apache:
plik httpd.conf

Kod
DirectoryIndex index.php index.php3 index.html index.htm


Ta dyrektywa spowoduje, że domyślnie będą się wgrywały podane pliki,
w kolejności wpisania (czyli jeśli nie bedzie index.php to odczyta
index.php3, jeśli zaś tego nie będzie to index.html itd.)
Go to the top of the page
+Quote Post
Sir Blade
post
Post #3





Grupa: Zarejestrowani
Postów: 211
Pomógł: 0
Dołączył: 7.06.2002

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


Wszystko fajnie ale jak sie nie ma kotaktu z serwerem to tylek zbity.
Polecam metode:
w pliku index.htm:

<meta http-equiv='refresh' content='0; url=index.php3'>

i po sprawie...
Go to the top of the page
+Quote Post
hyper
post
Post #4





Grupa: Zarejestrowani
Postów: 207
Pomógł: 0
Dołączył: 7.03.2002
Skąd: Warszawa

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


Można też użyć do tego celu ramek.
Go to the top of the page
+Quote Post
castor
post
Post #5





Grupa: Zarejestrowani
Postów: 456
Pomógł: 0
Dołączył: --

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


Cytat
Wszystko fajnie ale jak sie nie ma kotaktu z serwerem to tylek zbity.
Polecam metode:
w pliku index.htm:

<meta http-equiv='refresh' content='0; url=index.php3'>

i po sprawie...

nie widzialem jeszcze serwera ,ktory ma obsluge php i nie ma ustawionego DirectoryIndex na *.php (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post
Sir Blade
post
Post #6





Grupa: Zarejestrowani
Postów: 211
Pomógł: 0
Dołączył: 7.06.2002

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


polecam phg.pl index.php3 nie dziala....
Go to the top of the page
+Quote Post
castor
post
Post #7





Grupa: Zarejestrowani
Postów: 456
Pomógł: 0
Dołączył: --

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


bo napewno index.php dziala :wink:
Go to the top of the page
+Quote Post
Sir Blade
post
Post #8





Grupa: Zarejestrowani
Postów: 211
Pomógł: 0
Dołączył: 7.06.2002

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


Cytat
bo napewno index.php dziala :wink:




wiesz nie sprawdzalem (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) ale php3 nie dzial



(IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post
Sir Blade
post
Post #9





Grupa: Zarejestrowani
Postów: 211
Pomógł: 0
Dołączył: 7.06.2002

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


phg.pl


index.php dziala......


:wink:
Go to the top of the page
+Quote Post
kryr
post
Post #10





Grupa: Zarejestrowani
Postów: 268
Pomógł: 0
Dołączył: --
Skąd: kielce

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


.php3 to raczej archaizm...
Go to the top of the page
+Quote Post
Sir Blade
post
Post #11





Grupa: Zarejestrowani
Postów: 211
Pomógł: 0
Dołączył: 7.06.2002

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


Cytat
.php3 to raczej archaizm...



dwa lata uzywam .php3 i jakos trudno sie pozbyc tego nawyku...
Go to the top of the page
+Quote Post
hyper
post
Post #12





Grupa: Zarejestrowani
Postów: 207
Pomógł: 0
Dołączył: 7.03.2002
Skąd: Warszawa

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


Na dobrze skonfigurowanym serwerze powinno być:

.php .php3 .phtml

wtedy nikt nie może narzekać, że coś nie działa (IMG:http://forum.php.pl/style_emoticons/default/laugh.gif)
spotkałem się też z .php4, może wartoby dodać ;>
Go to the top of the page
+Quote Post
kryr
post
Post #13





Grupa: Zarejestrowani
Postów: 268
Pomógł: 0
Dołączył: --
Skąd: kielce

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


och nawyki... tak to z nimi jest - szybko przyszlo i nie chce odejsc (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
Go to the top of the page
+Quote Post
Sir Blade
post
Post #14





Grupa: Zarejestrowani
Postów: 211
Pomógł: 0
Dołączył: 7.06.2002

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


Cytat
och nawyki... tak to z nimi jest - szybko przyszlo i nie chce odejsc (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)



to prawda (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 18.12.2025 - 21:56