Jump to content

Help Please? im a php dumbass


hayw0027

Recommended Posts

Hey Guys,

 

Im only just learning the ropes when it comes to php and im having a bit of trouble figuring out some errors that im getting on my site.

 

What does this mean?

 

Parse error: parse error, unexpected T_CASE in /hsphere/local/home/hayw0027/im-articles.com/code/articlems.php(45) : eval()'d code on line 25

 

This error comes up on the top of every article page in my article directory. e.g http://im-articles.com/other/how-to-spot-a-company-scam.html

 

What do i do to solve this problem?

 

Be great if you can help

 

Thanx

 

Hayz ;D

Link to comment
https://forums.phpfreaks.com/topic/124425-help-please-im-a-php-dumbass/
Share on other sites

This is the first part of my php code.

 

<?php

if (!defined('ARTICLEMS')) {

header('HTTP/1.0 403 Forbidden');

die;

}

/**

* Main board view

*

**/

 

//---Placeholder Classes---

$Category = new baseclass();

$Comments = new baseclass();

$Article = new baseclass();

$Blocks = new baseclass();

$Page = new baseclass();

$Search = new baseclass();

$Plugin = new baseclass();

//--------------

 

class articlems extends articlemscore{

 

    function doTemplates($templateset, $templatename){

    global $Profile;

    global $Member;

        global $Article;

        global $Category;

        global $Search;

        global $Searchresults;

        global $Blocks;

        global $Page;

        global $Plugin;

        global $Comment;

        global $time_start;

 

if ($templateset){

 

if ($templateset == '_MESSAGE'){

$this->output = $templatename;

}

else{

        $this->templatephp = $this->get_template($templateset, $templatename, 1);

 

 

I cant see anything wrong with the code on the 25th line.

 

Yes, this is my live site. How do you turn off the error logs.

 

Thankyou

 

Hayz

<?php

if (!defined('ARTICLEMS')) {

header('HTTP/1.0 403 Forbidden');

die;

}

/**

* Main board view

*

**/

 

//---Placeholder Classes---

$Category = new baseclass();

$Comments = new baseclass();

$Article = new baseclass();

$Blocks = new baseclass();

$Page = new baseclass();

$Search = new baseclass();

$Plugin = new baseclass();

//--------------

 

class articlems extends articlemscore{

 

    function doTemplates($templateset, $templatename){

    global $Profile;

    global $Member;

        global $Article;

        global $Category;

        global $Search;

        global $Searchresults;

        global $Blocks;

        global $Page;

        global $Plugin;

        global $Comment;

        global $time_start;

 

if ($templateset){

 

if ($templateset == '_MESSAGE'){

$this->output = $templatename;

}

else{

        $this->templatephp = $this->get_template($templateset, $templatename, 1);        

 

        $this->message = NULL;

        eval($this->templatephp);

       

        if ($this->message != NULL){

            $this->output = $this->message;

        }

        else{

        $this->template = $this->get_template($templateset, $templatename);

            $this->output = eval($this->formattemplate($templatename, $this->template));

        }

}

}

 

if ($this->bypass_cms == 1){

echo $this->output;

exit;

}

 

$universal_set = $this->get_templateset('universal');

$universal_set_php = $this->get_templateset('universal',1);

       

        eval($universal_set_php['header']);

        eval($universal_set_php['footer']);

        eval($universal_set_php['main']);

 

 

 

There we go, what do you guys reckon?

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.