I can't seem to run an index.php I just compiled.
Parse error: parse error, unexpected '<', expecting T_CASE or T_DEFAULT or '}' in C:\*\*\*\*\*\*\*.tmp on line 22.
Ive completly debugged it and there are no errors. Yet when I try to run it that message pops up. Forgive me if this is a common error but I can't seem to fix it.
Any help is appreciated.
~Crazy
If you post the code i'll go through and find the bug for you. :)
Note that the error in PHP is relative, the error *MIGHT* be on line 21.
Post the code with the error.
At least post ~5 lines before / after line 22. So 17-27 respectively.
<?php
?>case 'members':
include 'modules/members/members.php';
break;
case 'public%files':
include 'modules/downloads/downloads.php';
break;
Is the code from the specified section. All the mods. fully work and there are no bugs in them. I tried recompiling it this morning and more errors came up. It continually redirects me to line(s) 19,20,21.
argh.....
There are no errors there but the little bugger keeps saying it's error ridden. I know its something very very simple that I forgot but it's just not coming to me.
Thanks
Quote from: Crazy_X on December 16, 2003, 08:31 AM
<?php
?>case 'members':
include 'modules/members/members.php';
break;
case 'public%files':
include 'modules/downloads/downloads.php';
break;
Your code is outside the php tags, unless you screwed up the post I doubt that would work...
Other than that it looks right, unless 'public%files' is invalid.
My fault, was in a hurry to get to school.
The % isn't on the line the so called "error" is on.
:-\
the code snippet that you posted looks like its being used as a redirect for an action thats is directed by the url (like this forum). might i suggest handeling it like yabbse does and have an array of pointed arrays ( array("action1" => array('function',"file_to_include.php"));) Just a thought...
Highlight line 20?
IIRC, in some programming languages (PHP included I think), "/" is used for special characters/functions, such as "/n" for new line, so you have to use "//".
Quote from: j0k3r on December 16, 2003, 08:39 PM
Highlight line 20?
IIRC, in some programming languages (PHP included I think), "/" is used for special characters/functions, such as "/n" for new line, so you have to use "//".
I believe you are thinking of the mostly-standard escape character,
\.
Your php tags are totally beserk.
Quote from: St0rm.iD on December 16, 2003, 09:42 PM
Your php tags are totally beserk.
he said that he rushed it becuase he had to go to school, so im thinking he just copied and pasted in a bad spot. but he put the php tags there, well, for extra info? idk acutaly, but he put them there :P
That code bit won't help us at all. Post the entire file and we can work with it, but a sample like that with broken tags doesn't really work.
Quote from: Crazy_X on December 16, 2003, 10:42 AM
My fault, was in a hurry to get to school.
The % isn't on the line the so called "error" is on.
:-\
Doesn't say anything about the tags though.