Jump to content

Unnexpected $end


elite_prodigy

Recommended Posts

What the hell does this mean? I have no idea, the line the error references is the final line of my code, the ?> line.

 

 

Parse error: syntax error, unexpected $end in /home/expose/public_html/site/functions.php on line 154

 

 

The last 20 or so lines of the file:


<?php

//...
//...
//...

case "sign":{

$area2 = '<div class="available"><h1>Congratulations!</h1>This domain is available for free registration.<a href="http://www.exposemyschool.com/sign_up.php">Sign Up Now!</a></div>';	

break;

}

default:{

  $area2 = '<div class="nav_error"><h1 class="title">Oops!</h1>The following error(s) occured while attempting to process your request:
<ul>
<li>The page you are looking for does not exist</li>
<li>The page was moved</li>
<li>The site you are searching for no longer exists</li>
<li>The site you are attempting to access has been deleted due to a terms of service violation.</li>
</ul>
Possible Solutions: Contact technical-support [at] exposemyschool [dot] com . There may be a fatal systems error that needs attention. Try refreshing the page. Make sure you typed the address correctly. If you are the owner of this site and are unable to access it contact User Services at: user-service [at] exposemyschool [dot] com . If you recently registered this site then try waiting. It may take several minutes to register in our systems.</div>';

   break;
}
}


?> //line 154

Link to comment
Share on other sites

if you didn't fix it yet ...

 

here is your code

 

<?php

//...
//...
//...

case "sign":{

$area2 = '<div class="available"><h1>Congratulations!</h1>This domain is available for free registration.<a href="http://www.exposemyschool.com/sign_up.php">Sign Up Now!</a></div>';	

break;

}

default:{

  $area2 = '<div class="nav_error"><h1 class="title">Oops!</h1>The following error(s) occured while attempting to process your request:
<ul>
<li>The page you are looking for does not exist</li>
<li>The page was moved</li>
<li>The site you are searching for no longer exists</li>
<li>The site you are attempting to access has been deleted due to a terms of service violation.</li>
</ul>
Possible Solutions: Contact technical-support [at] exposemyschool [dot] com . There may be a fatal systems error that needs attention. Try refreshing the page. Make sure you typed the address correctly. If you are the owner of this site and are unable to access it contact User Services at: user-service [at] exposemyschool [dot] com . If you recently registered this site then try waiting. It may take several minutes to register in our systems.</div>';

   break;
}
}


?> //line 154

 

unless they changed the syntax for a switch it should look something like this

 

<?

switch ($varThatSwitches){

case "valofswitch" :
   echo 'some items of value';
break;

case "val2ofswitch" :
   echo 'some items of value';
break;

default:
  echo 'some default items of value';
break;
}

?>

 

unfortunately unexpected $end errors can be very ambiguous about what errors they reference and also what lines they refer to.

 

here is a great tut on using switches  http://www.devshed.com/c/a/PHP/PHP-The-Switch-Statement-and-Arrays/

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.