Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [psnews]problem z rozwinięciem newsa
Forum PHP.pl > Forum > Gotowe rozwiązania
igiko
Problem ten wystepuje jesli kliknie się wiecej i niema tam zadnych komentarz...jesli one sa to problemu zauwazylem ze niema. Rozwiniety news co prawda pokazuje się, ale nad nim wyskakuje szeroka lista błedów. Błąd wyskauje także po dodaniu komentarza..ale komentarz dodaje
Kod
Warning: fopen(): open_basedir restriction in effect. File(/templates//wiadomosc.html) is not within the allowed path(s): (/home/pomezani/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/pomezani/public_html/CCleaguePro/news/functions.php on line 183

Warning: fopen(/templates//wiadomosc.html): failed to open stream: Operation not permitted in /home/pomezani/public_html/CCleaguePro/news/functions.php on line 183

Warning: filesize(): open_basedir restriction in effect. File(/templates//wiadomosc.html) is not within the allowed path(s): (/home/pomezani/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/pomezani/public_html/CCleaguePro/news/functions.php on line 184

Warning: fread(): supplied argument is not a valid stream resource in /home/pomezani/public_html/CCleaguePro/news/functions.php on line 184

Warning: fclose(): supplied argument is not a valid stream resource in /home/pomezani/public_html/CCleaguePro/news/functions.php on line 185

Oto te linie
  1. <?php
  2. $file = fopen($filename, "r");
  3. $tpl_source = fread($file, filesize($filename));
  4. fclose($file);
  5. ?>

Zamieszcze jeszcze caly framgment tego kodu moze to komus cos pomoze
  1. <?php
  2. function tplparse($przed_arr,$po_arr,$template,$newspath,$tplfile){
  3. reset($przed_arr);
  4. reset($po_arr);
  5. $filename = "$newspath/templates/$template/$tplfile";
  6. $file = fopen($filename, "r");
  7. $tpl_source = fread($file, filesize($filename));
  8. fclose($file);
  9. while((list($key_przed, $przed) = each($przed_arr))&&(list($key_po, $po) = each($po_arr))){
  10. $tpl_source = str_replace($przed, $po, $tpl_source);
  11. }
  12. $tpl_source = str_replace("{TPLPATH}", "$newspath/templates/$template", $tpl_source);
  13. return("$tpl_source");
  14. }
  15. ?>

Widziałem ze ktos tutaj radil w troche innej jednak podobnej kodowo sprawie zamienic return("$tpl_source"); na return($tpl_source); jednak niedało to efektu
tiraeth
Przy includowaniu news.php ustawiłeś zmienną $newspath questionmark.gif
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2024 Invision Power Services, Inc.