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?

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

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

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.