dziwny problem na serwie

Konfiguracja pozostałych skryptów.
maaaciek36
Posty: 11
Rejestracja: 27 lis 2011, 22:01:24
Strona na CBA.pl: ps-download
Płeć: Niewybrana
User Agent: Chrome Windows 1440x900

dziwny problem na serwie

Post autor: maaaciek36 »

Witam na serwer wrzuciłem skrypt php i mam taki błąd nie wiem o cho chodzi ďťżďťż

główny skrypt

Kod: Zaznacz cały

<?php
/**
* This class can display latest threads or posts
* formated in unordered list (<ul/>)
* It doesn't depend on place where script is being run
* just initialize class and execute proper method
* 
* @author Mariusz "marines" Kujawski <marinespl@gmail.com>
* @link http://marines.jogger.pl/
* @version 0.1
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
class MyBBLatest {
   // mysql db handler
   private $db;
   // tables prefix
   private $prefix;
   // url to mybb
   private $url;
   /**
   * constructor
   *
   * @param string $mybb path to MyBB instalation
   * @param string $url URL of MyBB instalation
   * @return boolean
   */
   public function __construct($mybb = 'http://ps-download.cba.pl/forum/', $url) {
      // include mybb config file
      @include('./' . $mybb . 'forum/inc/config.php');
      // db connect
      $this->db = @mysql_connect($config['database']['hostname'], $config['database']['username'], $config['database']['password']);
      // db choose
      @mysql_select_db($config['database']['database'], $this->db);
      // stop executing if db connection isn't availible
      if (!$this->db) return false;
      // set db prefix
      $this->prefix = $config['database']['table_prefix'];
      // set base url of mybb
      $this->url = $url;
      // return
      return true;
   }
   /**
   * display latest threads
   *
   * @param integer $many indicates how many threads have to be retrieved from database
   * @param boolean $lastpost indicates whether link has to direct to last post in thread
   * @param integer $fid ID of forum which threads have to be retrieved from
   * @return string list of threads
   */
   public function threads($many = 10, $lastpost = false, $fid = false) {
      // forum id select
      if ($fid) {
         $where = 'WHERE `fid` = ' . $fid;
      }
      if ($lastpost) {
         $last = '&action=lastpost';
      }
      // initialize temporary var
      $tmp = '<ul class="last-threads">';
      // select data
      $query = @mysql_query('SELECT `tid`, `subject` FROM `' . $this->prefix . 'threads` ' . $where . ' ORDER BY `dateline` DESC LIMIT ' . $many);
      // check if query has result
      if (!$query) return false;
      // collect data into list
      while ($row = mysql_fetch_array($query)) {
         $tmp .= '<li><a href="' . $this->url . 'showthread.php?tid=' . $row[0] . $last . '">' . $row[1] . '</a></li>';
      }
      $tmp .= '</ul>';
      // return list of threads
      return $tmp;
   }
   /**
   * display latest posts
   *
   * @param integer $many indicates how many posts have to be retrieved from database
   * @param integer $fid ID of forum which posts have to be retrieved from
   * @return string list of posts
   */
   public function posts($many = 10, $fid = false) {
      // forum id select
      if ($fid) {
         $where = 'WHERE `fid` = ' . $fid;
      }
      // initialize temporary array
      $tmp = '<ul class="last-threads">';
      // select db data
      $query = @mysql_query('SELECT `pid`, `tid`, `subject` FROM `' . $this->prefix . 'posts` ' . $where . ' ORDER BY `dateline` DESC LIMIT ' . $many);
      // check if query has result
      if (!$query) return false;
      // collect data into list
      while ($row = mysql_fetch_array($query)) {
         $tmp .= '<li><a href="' . $this->url . 'showthread.php?tid=' . $row[1] . '&pid=' . $row[0] . '#pid' . $row[0] . '">' . $row[2] . '</a></li>';
      }
      $tmp .= '</ul>';
      // return posts
      return $tmp;
   }
} // MyBBLatest end
?>
skrypt do wyświetlania

Kod: Zaznacz cały

<?php
require_once('MyBBLatest.class.php');

$mybb = new MyBBLatest('','http://ps-download.cba.pl/forum/');
?>
<?php
echo $mybb->threads(); 
?>
strona gdzie znalazłem skrypt http://forum.mybboard.pl/wiki.php?najno ... ronie.html
moja strona http://ps-download.cba.pl/index2.php
Awatar użytkownika
DeaDriam
Posty: 4023
Rejestracja: 04 lip 2011, 14:00:40
Lokalizacja: Möglingen
Płeć: Mężczyzna
User Agent: Firefox Windows 1024x768
Kontakt:

Re: dziwny problem na serwie

Post autor: DeaDriam »

notatnik wstawia BOM czyli właśnie te dwa magiczne znaczki, które robią taki efekt
weż Notatnik++, otworz w nim plik Format -> koduj w utf8 bez BOM i powinno być po sprawie
sprawdż w indexie.. i usuń
_____________________________________________________
Nie badz pijawka-znalazles rozwiazanie problemu..podziel sie na forum!
----------------------------------------------------------------------------
SmacznY WordpresS>> http://www.przepisyzgarnka.pl <<
maaaciek36
Posty: 11
Rejestracja: 27 lis 2011, 22:01:24
Strona na CBA.pl: ps-download
Płeć: Niewybrana
User Agent: Chrome Windows 1440x900

Re: dziwny problem na serwie

Post autor: maaaciek36 »

thx pomogło :)

---- EDIT ----

a jak bym mógł te kropki usunąć albo zamienić na to >>
nowy adres http://ps-download.cba.pl/
ODPOWIEDZ