Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a syntax error in my index.php in lines 35 and 49. How can I fix it? My website shows the following error message " ERROR WHOOPS! WE'VE GOT A PROBLEM syntax error, unexpected end of file The page you were looking for doesn't exist. Sorry about that."


PHP
<?php
/**
 * Copyright (c) Extensionsforjoomla.com - E4J - Templates for Joomla
 * 
 * You should have received a copy of the License
 * along with this program.  If not, see <https://e4j.com/>.
 * 
 * For any bug, error please contact us
 * We will try to fix it.
 * 
 * Extensionsforjoomla.com - All Rights Reserved
 * 
 */

$doc = JFactory::getDocument();
include('./templates/'.$this->template.'/config/colswitch.php');


$doc->addStyleSheet('templates/' . $this->template . '/css/bootstrap/bootstrap.css');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" class="client-nojs">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
  $css_string;
  $menutitle = $this->params->get('mobiletext'); 
  $get_less = $this->params->get('enabless'); 
?>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/general.css" type="text/css" />

<script>localStorage.clear(); </script>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/css/templateskit.css" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/js/templateskit.js"></script>

<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="true">
  
<jdoc:include type="head" />

<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/main.css" type="text/css" />

<?php include('./templates/'.$this->template.'/blocks/config.php'); ?>

  <?php if(


What I have tried:

I dont know much about language encoding.
Posted
Updated 18-Jul-20 0:51am
v2
Comments
Richard MacCutchan 18-Jul-20 7:00am    

Look at the code, paying attention to the end of the file:
PHP
<?php include('./templates/'.$this->template.'/blocks/config.php'); ?>

  <?php if(
You open a script block, open an if inside that, open a set of brackets - but you don't close any of them!
I'm not really surprised that you get an "unexpected end of file" error!
 
Share this answer
 
Quote:
I have a syntax error in my index.php in lines 35 and 49. How can I fix it? My website shows the following error message " ERROR WHOOPS! WE'VE GOT A PROBLEM syntax error, unexpected end of file The page you were looking for doesn't exist. Sorry about that."

For lne 49, it is obvious, the end of the file is missing, there is nothing we can do about it, you may turn to the author of this file.
Line 35 can't have same message, or is not on same file.
Please paste exact error messages.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900