0

I'm using php 5.4 version. I got the problem after I upload my Joomla cms folder from my localhost to my webhosting.

This is the code

<?php

defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params  = $this->item->params;
$images  = json_decode($this->item->images);
$urls    = json_decode($this->item->urls);
$canEdit = $params->get('access-edit');
$user    = JFactory::getUser();
$info    = $params->get('info_block_position', 0);
JHtml::_('behavior.caption');
$useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') ||          $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params-   >get('show_parent_category') || $params->get('show_author'));

?>

I get this error

Parse error: syntax error, unexpected 'defined' (T_STRING) in /home/u854215895/public_html/templates/realestate/html/com_content/article/default.php on line 1

Please help... Thanks

1
  • are you on windows ? if so, make sure your file has unix ending line character \n and not the windows \r\n ones. Commented Dec 13, 2013 at 13:27

1 Answer 1

1

Remove the space from here

$params-   >get('show_parent_category')
       --^--

So it goes like this.

$useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') ||          $params->get('show_create_date')
        || $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author'));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.