I am using a Pagination class that I found on Codecanyon that works wonders on a virtual host ( XAMPP ). I just uploaded it to the server the site is for, and almost the whole class is rendered as plain text where it’s included, instead of being used, so to speak.
The whole site is PHP based, and works perfectly, but this little class is simply printed as text. I really can’t figure out why, and I am in desperate need to find a solution to this as quickly as possible.
Here are the first plain text that is shown from the class;
phrase=array(); $this->setCurrentPage($currentPage);
$this->setTotalResults($totalResults);
$this->setResultsPerPage($resultsPerPage);
$this->setLanguage($language);
.. and on it goes to the end of the class file.
This is the first lines in the class’ constructor ( and the $this-> key is omitted in the plain text.. (?). Here is the first lines of the constructor itself;
function __construct($currentPage,$totalResults,$resultsPerPage=25,$language='en',$pathToLanguageFile='../language/')
{
$this->phrase=array();
$this->setCurrentPage($currentPage);
$this->setTotalResults($totalResults);
Here is a link to the class posted by the author on codecanyon; http://codecanyon.net/item/scrolling-pagination-class/113230
I’m sure it’s some server setting that does this, but which/where/why?
(I’m not posting the whole pagination class, since it has been bought, and the license obstructs me from doing this, although I can’t imagine it’s the class’ fault)
I would be immensely appreciative for any help and/or pointers.
Thank you.
EDIT
Silly me did not notice that “< ?” was the first line of the file instead of “< ?php”.
Thank you for the comments, and I am truly sorry for the unnecessary question.
Thanks
The tag ‘< ?’ was at the first line of the file, instead of ‘< ?php’.
That was the cause of it all.