Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Link
wozniak
post
Post #1





Grupa: Zarejestrowani
Postów: 278
Pomógł: 0
Dołączył: 21.11.2003

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


Moge to jakos latwiej zapisac? tak abym nie musiał do kazdego linka pisac tego jeszcze raz
Kod
if ($k=="redakcja")

    {

    include("modules/redakcja/index.php");

    }

  

if ($k=="tuning")

    {

    include("modules/tuning/menu.php");

(IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
adwol
post
Post #2





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

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


Cytat
no ok, ale jest jakis sposob ze nie musze pisac tego do kazdego linku to jak to zrobic? (IMG:http://forum.php.pl/style_emoticons/default/rolleyes.gif)

[php:1:7323a49c15]<?php
if (strpos($k, '/') === false && $k != '.' && $k != '..' && is_file("modules/$k/index.php"))
{
include "modules/$k/index.php";
}
?>[/php:1:7323a49c15]
Go to the top of the page
+Quote Post

Posty w temacie


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: 11.10.2025 - 05:21