Jump to content

VERY Basic Help Needed


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?

 

Here is the php code where the problem exists.

 

<?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?

???

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/124729-very-basic-help-needed/
Share on other sites

the problem appears to be the use of eval on line 25:

 

eval()'d code on line 25

 

apparently, php is trying to evaluate whatever is in one of the eval's as a CASE what are the values inside those eval's? $universal_set_php['header'], etc.? we'd probably need to see them

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.