Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [psnews]problem z rozwinięciem newsa
igiko
post
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 30.09.2005

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


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
Go to the top of the page
+Quote Post

Posty w temacie


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: 19.08.2025 - 06:28