seamoh Posted June 9, 2011 Report Share Posted June 9, 2011 Hello all , I use zend studio for practicing killer php advanced series as the tutorial says: I use the following codes: <?php define('APPLICATION_PATH', realpath('../')); $paths = array ( APPLICATION_PATH, APPLICATION_PATH.'/com', get_include_path() ); set_include_path(implode(PATH_SEPARATOR, $paths)); var_dump(get_include_path()); echo "<br />"; function __autoload($className) { $filename = str_replace('\\', '/', $className); require_once $filename; } use \com\killerphp\models as Models; //require_once ('User.php'); $user = new User(); echo $user->getName(); ?> zend studio shows me this error syntax error, unexpected 'com', expecting '(' besides the use \com\killerphp\models as Models; it seems that zend studio has a problem with this syntax , I should mention that I use windows xp. Sincerely yours seamoh Quote Link to comment Share on other sites More sharing options...
falkencreative Posted June 10, 2011 Report Share Posted June 10, 2011 Have you tested this outside of Zend Studio, accessing the code through localhost? When I test the code, I do get errors saying it can't find the User.php file, but I'm not getting the syntax error that you say you get, which makes me think that maybe Zend Studio is getting confused. Quote Link to comment Share on other sites More sharing options...
seamoh Posted June 15, 2011 Author Report Share Posted June 15, 2011 Have you tested this outside of Zend Studio, accessing the code through localhost? When I test the code, I do get errors saying it can't find the User.php file, but I'm not getting the syntax error that you say you get, which makes me think that maybe Zend Studio is getting confused. You are completely right Ben ,I accessed it through localhost and it worked . but it seems that we should change the code in oreder that zend studio will be able to parse the code ,what is your idea? Sincerely yours Quote Link to comment Share on other sites More sharing options...
falkencreative Posted June 15, 2011 Report Share Posted June 15, 2011 I don't think there is much you can do. This sounds like a Zend Studio bug, which is something you don't have any control over. You'll just have to ignore that particular error. 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.
Note: Your post will require moderator approval before it will be visible.