VeeDubZ Posted January 28, 2007 Share Posted January 28, 2007 having a bit of trouble when it comes to move split or lock a topic on my phpbb board i keep getting this error[CODE]Parse error: syntax error, unexpected $end in /home/www/evolutionrpm.co.uk/Forum/modcp.php on line 1368[/CODE]a txt file of modcp.php can be found [URL=http://"http://www.evolutionrpm.co.uk/forum/modcp.txt"]HERE[/URL]any help is greatly appreciated as im a total noob to php Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 28, 2007 Share Posted January 28, 2007 Your link doesn't work. Quote Link to comment Share on other sites More sharing options...
Orio Posted January 28, 2007 Share Posted January 28, 2007 I cant access the txt. It redirects me to some hosting company website.The "unexpected $end" error, in most cases, means you have a missing closing brace. Check your code.Orio. Quote Link to comment Share on other sites More sharing options...
VeeDubZ Posted January 28, 2007 Author Share Posted January 28, 2007 sorry try [url=http://www.evolutionrpm.co.uk/Forum/modcp.txt]http://www.evolutionrpm.co.uk/Forum/modcp.txt[/url] Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 28, 2007 Share Posted January 28, 2007 The closing tag is ?>, not php?> Quote Link to comment Share on other sites More sharing options...
acp26b Posted January 28, 2007 Share Posted January 28, 2007 [code]else{ if ( $delete ) { $mode = 'delete'; } else if ( $move ) { $mode = 'move'; } else if ( $lock ) { $mode = 'lock'; } else if ( $unlock ) { $mode = 'unlock'; }[/code]you are missing the "}" to close the else Quote Link to comment Share on other sites More sharing options...
VeeDubZ Posted January 29, 2007 Author Share Posted January 29, 2007 where does the } to close the else need to go??also i read that you can do ?> or php?> to close the tag Quote Link to comment Share on other sites More sharing options...
HuggieBear Posted January 29, 2007 Share Posted January 29, 2007 The closing tags should always be [color=green]?>[/color]If the php_ini settings allow, you can use short tags to open php, so you can use [color=green]<?[/color] instead of [color=green]<?php[/color] but it's never advisable as it's installation specific and makes the code less portable.RegardsHuggie Quote Link to comment Share on other sites More sharing options...
VeeDubZ Posted January 29, 2007 Author Share Posted January 29, 2007 what about the } on the else where should that go???? Quote Link to comment Share on other sites More sharing options...
HuggieBear Posted January 29, 2007 Share Posted January 29, 2007 At the very end...[code]else{ if ( $delete ) { $mode = 'delete'; } else if ( $move ) { $mode = 'move'; } else if ( $lock ) { $mode = 'lock'; } else if ( $unlock ) { $mode = 'unlock'; }}[/code]RegardsHuggie Quote Link to comment Share on other sites More sharing options...
VeeDubZ Posted January 30, 2007 Author Share Posted January 30, 2007 now i get this[code]Parse error: syntax error, unexpected T_ELSE in /home/www/evolutionrpm.co.uk/Forum/modcp.php on line 125[/code] Quote Link to comment Share on other sites More sharing options...
Orio Posted January 30, 2007 Share Posted January 30, 2007 Cant you go over the code yourself and find your missing braces? This is not a "do it for me" forum. You may go to the freelancing forum and ask someone there to do it for you...[code]else{ if ( $delete ) { $mode = 'delete'; } elseif ( $move ) { $mode = 'move'; } elseif ( $lock ) { $mode = 'lock'; } elseif ( $unlock ) { $mode = 'unlock'; } // MOD MODCP EXTENSION BEGIN elseif ( $sticky ) { $mode = 'sticky'; } elseif ( $announce ) { $mode = 'announce'; } elseif ( $normalise ) { $mode = 'normalise'; } // MOD MODCP EXTENSION END else { $mode = ''; }}[/code]Orio. Quote Link to comment Share on other sites More sharing options...
VeeDubZ Posted January 30, 2007 Author Share Posted January 30, 2007 like i said im a total noob, sorry to bother you and thankyou for the help. ;D Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 30, 2007 Share Posted January 30, 2007 Anytime you open a { you must close it.}Get a decent editor (Textpad is good) and it will do syntax highlighting and help with indentation. Quote Link to comment Share on other sites More sharing options...
paul2463 Posted January 30, 2007 Share Posted January 30, 2007 or you can try <a href="http://www.mpsoftware.dk/downloads.php">PHP Designer 2007 (Free Version)</a> its a very nice editor which when you open something like a curly brace it automatically writes the closing brace for you, saves you forgetting Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.