Wszystko o językach skryptowych takich jak PHP i Perl, serwerach WWW, CGI, bazach danych i języku SQL.
waltorix
Posty: 4 Rejestracja: 28 mar 2015, 15:04:09
Płeć:
User Agent:
Post
autor: waltorix » 28 mar 2015, 15:05:59
witam jestem nowy i mam problem z skryptem php który ma za zadanie wyswietlac mi strone w tabelce z menu np
klikne w ikonke cennik to pod tym powinna mi sie wyswietlic zawartośc strony cennik.php
zawartość index.php
<center>
<body background="grafika/tlo.jpg">
<table border="1" width="950px">
<tr>
<td align="center" valign="middle">
<?php include "data/naglowek.php"; ?>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<?php include "data/menu.php"; ?>
</td>
</tr>
<tr>
<td align="center" valign="middle">
<?php
error_reporting(0);
$st = $_GET['st'];
if(!empty($st))
{
if(is_file("data/$st.php")) include "data/$st.php";
}
else include "data/start.php";
?>
</td>
</tr>
<td align="center" valign="middle">
<?php include "data/stopka.php"; ?>
</td>
</tr>
</table>
</body>
</center>
a tutaj zawartość pliku menu.php
<a href="index.php"><img src="grafika/stronaglowna.gif" width="150"/></a>
<a href="index.php?st=oferty.php"><img src="grafika/oferty.gif"width="150"/></a>
<a href="index.php?st=galeria.php"><img src="grafika/galeria.gif"width="150"/></a>
<a href="index.php?st=cennik.php"><img src="grafika/cennik.gif"width="150"/></a>
<a href="index.php?st=inforamcje.php"><img src="grafika/informacje.gif"width="150"/></a>
<a href="index.php?st=kontakt.php"><img src="grafika/kontakt.gif"width="150"/></a>
3 dni sie męcze i nie wiem o co chodzi
waltorix
4zywioly
Posty: 528 Rejestracja: 26 kwie 2011, 16:33:42
Strona na CBA.pl: 4zywioly.c0.pl
Płeć:
User Agent:
Kontakt:
Post
autor: 4zywioly » 28 mar 2015, 15:22:42
W menu masz odnośnik do index.php?st=cennik.php
a w include masz $st.php czyli obecnie includujesz plik cennik.php.php
4zywioly
waltorix
Posty: 4 Rejestracja: 28 mar 2015, 15:04:09
Płeć:
User Agent:
Post
autor: waltorix » 28 mar 2015, 15:28:39
czyli wystarczy usunąć .php ? z linijki
waltorix
po22
Posty: 404 Rejestracja: 02 sty 2015, 14:57:43
Płeć:
User Agent:
Post
autor: po22 » 28 mar 2015, 15:36:09
waltorix , tak usun w jednym miejscu.
Czy wiesz ,
że :
W Panelu CBA w sekcji "wsparcie" jest dedykowany system ticketów (obsługi technicznej)
Odpowiadamy na Forum oraz na adres mailowy obsluga(malpa)cba.pl
Jesteśmy również na Facebooku ! Znajdź nas na facebook.com/hostingcba | cba.pl
W czym jeszcze możemy pomóc?
po22
waltorix
Posty: 4 Rejestracja: 28 mar 2015, 15:04:09
Płeć:
User Agent:
Post
autor: waltorix » 28 mar 2015, 15:43:07
a mogl by mi ktos wskazac gdzie dokladnie bo usunalem ale nic nie pomaga
waltorix
po22
Posty: 404 Rejestracja: 02 sty 2015, 14:57:43
Płeć:
User Agent:
Post
autor: po22 » 28 mar 2015, 16:00:19
przykladowo tutaj
Kod: Zaznacz cały
<a href="index.php"><img src="grafika/stronaglowna.gif" width="150"/></a>
<a href="index.php?st=oferty.php"><img src="grafika/oferty.gif"width="150"/></a>
<a href="index.php?st=galeria.php"><img src="grafika/galeria.gif"width="150"/></a>
<a href="index.php?st=cennik.php"><img src="grafika/cennik.gif"width="150"/></a>
<a href="index.php?st=inforamcje.php"><img src="grafika/informacje.gif"width="150"/></a>
<a href="index.php?st=kontakt.php"><img src="grafika/kontakt.gif"width="150"/></a>
zrob index.php?st=ofety itd.
Czy wiesz ,
że :
W Panelu CBA w sekcji "wsparcie" jest dedykowany system ticketów (obsługi technicznej)
Odpowiadamy na Forum oraz na adres mailowy obsluga(malpa)cba.pl
Jesteśmy również na Facebooku ! Znajdź nas na facebook.com/hostingcba | cba.pl
W czym jeszcze możemy pomóc?
po22
waltorix
Posty: 4 Rejestracja: 28 mar 2015, 15:04:09
Płeć:
User Agent:
Post
autor: waltorix » 28 mar 2015, 16:13:40
wielkie dzieki a ja cały czas szukałem problemu w indexie
myślę ze można temat zamknąć
waltorix