Jump to content

Parse error: syntax error, unexpected ';', expecting T_CATCH


mark103

Recommended Posts

Hi guys,

 

I have a problem with the script. There is a parse error in line 7 which it end of the line. I need your help to make them get correct, as I am not a programmer and know very little PHP.

 

 

Here it is the code:

 

 

<?php

try
{
    include_once('HideUrlConfig.php');
}
?>

 

 

Parse error: syntax error, unexpected $end, expecting T_CATCH in /home/username/public_html/mysite.com/myscript.php on line 6

 

 

What do I needs to change it with?

Link to comment
Share on other sites

Depends on what else is in the file, read this from the manual to understand more on exception handling (which is where try/catch comes from)

 

But from that little excerpt, it looks odd anyway, like there is lot's more code missing.. the include_once() function has been called properly and there is a ; on the end, so I think that you are needing more code around it; unfortunately I don't use exception handlers very much.

 

Rw

Link to comment
Share on other sites

as I am not a programmer and know very little PHP.

Sometimes I should read a bit slower, I didn't notice that part of the post. I can't really post anything as I don't know the context of the project that this is involved with, and since it's been ages since I used it, I don't really want to trawl through archived code that I haven't got to hand...

 

Hopefully some kind soul reading this forum tonight can be a little more helpful. Hope you find your answer soon anyway.

 

Rw

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.