Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP]include banera flash
vk-koronowo
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 24.12.2010

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


Mam na serwerze pliki:
str1...
str2
....|_index.php
....|_include
....|.........|_banern
....|.........|..........|_baner1.php
....|.........|..........|_baner2.php
....|.........|_image
....|...................|_obrazek.gif
....|_ksiega
..............|_ksiegagosci.php

w index.php jest odnośnik do ksiega/ksiegagosci.php
w ksiegagosci.php znajduje sie kod:
  1. <?php
  2.  
  3. $rand = rand(1, 2);
  4. if($rand == '1') { include 'include/banern/baner1.php'; }
  5. if($rand == '2') { include 'include/banern/baner2.php'; }
  6.  
  7. ?>

w np. baner1.php
  1. <div id="flashcontent">
  2. <strong>Musisz zaktualizaowac swoja wersje Flash Playera. </strong>
  3. </div>
  4. <script type="text/javascript" src="banery/baner1/swfobject.js"></script>
  5. <script type="text/javascript">
  6. <!-- <![CDATA[
  7. var so = new SWFObject("banery/baner1/750_200_02.swf", "750_200_02", "750", "200", "8", "#FF6600");
  8. so.addVariable("xmlText", "banery/baner1/text.xml");
  9. so.addVariable("xmlLink", "banery/baner1/link.xml");
  10. so.addParam("wmode", "transparent");
  11. so.write("flashcontent");
  12. //-->
  13. </script>

wywala mi błąd include w liniach:
if($rand == '1') { include 'include/banern/baner1.php'; }
if($rand == '2') { include 'include/banern/baner2.php'; }
a jesli wpisze:
if($rand == '1') { include '../include/banern/baner1.php'; }
if($rand == '2') { include '../include/banern/baner2.php'; }
to pojawia sie komunikat z div...
dodam ze w ksiegagosci.php mam scieżki np. ../include/image/obrazek.gif i działają...
Go to the top of the page
+Quote Post
daros17
post
Post #2





Grupa: Zarejestrowani
Postów: 233
Pomógł: 27
Dołączył: 27.08.2007

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


spróbuj dać include w ten sposób:
  1. include $_SERVER['DOCUMENT_ROOT'].'/folder/plik.php';


Ten post edytował daros17 24.12.2010, 01:26:10
Go to the top of the page
+Quote Post
vk-koronowo
post
Post #3





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 24.12.2010

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


Niestety wciąż ten sam błąd. nie mam pojecia co może być nie tak.questionmark.gifquestionmark.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 Aktualny czas: 20.08.2025 - 13:22