Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Includowanie strony
piotrek442
post
Post #1





Grupa: Zarejestrowani
Postów: 48
Pomógł: 0
Dołączył: 30.03.2013

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


Mam problem z includowaniem strony z pewną zmienną

Robie to tak:

  1. switch($_GET['page']) {
  2.  
  3. case 'profile':
  4. include 'profile.php?id='.$user_data['user_id'].'';
  5. break;
  6. }


a link do tej prodstrony taki :
  1. <a href="index.php?page=profile">Wyświetl swój profil</a>


niestety mi wyskakuje błąd ;/

Warning: include(profile.php?id=1) [function.include]: failed to open stream: No such file or directory in...
Warning: include() [function.include]: Failed opening 'profile.php?id=1' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in ..

proszę o pomoc , nie wiem jak sobie z tym poradzić
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
!*!
post
Post #2





Grupa: Zarejestrowani
Postów: 4 298
Pomógł: 447
Dołączył: 16.11.2006

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


a tak:

  1. include './profile.php?id='.$user_data['user_id'];
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: 16.09.2025 - 21:44