Current location: Hot Scripts Forums » Programming Languages » PHP » Parse error...


Parse error...

Reply
  #1 (permalink)  
Old 08-11-10, 08:35 AM
Daimler Daimler is offline
New Member
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Parse error...

Quote:
goto ('login.php');
This is line 82

And this is the error:

Parse error: syntax error, unexpected '(', expecting T_STRING in /home/anuntofe/public_html/dirweb/header.php on line 82

Some help? thanks
Reply With Quote
  #2 (permalink)  
Old 08-11-10, 09:38 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
As of PHP 5.3, goto is a registered keyword, so you can't have a function named that.

PHP: goto - Manual
Reply With Quote
  #3 (permalink)  
Old 08-11-10, 10:51 AM
Daimler Daimler is offline
New Member
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
So can i modify this code to work? if yes, how ? thanks
Reply With Quote
  #4 (permalink)  
Old 08-11-10, 11:04 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Rename the function to something else.

Search where it says "function goto"... and rename it to "function redirect" (or anything you like). Then replace all instances of "goto" with "redirect".
Reply With Quote
  #5 (permalink)  
Old 08-11-10, 11:19 AM
Daimler Daimler is offline
New Member
 
Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you, that works but now i have another error:/

Quote:
Fatal error: Call to undefined function loadClass() in
Any ideea ?

This is the line;
Quote:
loadClass("DirCategory");
Reply With Quote
  #6 (permalink)  
Old 08-11-10, 12:04 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
That means PHP is calling a function that doesn't exist. See if you find "function loadClass" somewhere in your code. If you do, include that file.

PHP Code:

include 'path/to/file/with/loadClass.php'
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRIN aprogrammer PHP 20 08-31-11 05:56 AM
C++ and MSSQL tutorials? scott2500uk C/C++ 8 05-11-09 02:33 AM
Syntax Error Nikas Database 4 05-15-08 10:48 AM
I cannot find what i messed up. Parse error: syntax error, unexpected T_CONSTANT_ENCA bilicek.com PHP 3 01-31-08 04:54 PM
[php error] parse error | fatal error xeoHosting PHP 1 01-03-04 08:12 PM


All times are GMT -5. The time now is 08:18 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.