bogdaniel Posted September 14, 2008 Share Posted September 14, 2008 can someone help with this code please ? i'm getting this error: Fatal error: Function name must be a string in C:\www\public_html\index.php on line 15 $folders = array( 'core' => 'core', 'application' => 'application', 'config' => 'config', ); if (is_array($folders(strpos($folders[core], '/') === FALSE))) { if (function_exits('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) { $folders[core] = realpath(dirname(__FILE__)) . '/' . $folders[core]; } } else { // Swap Directory Separators to Unix Style For Consistency $folders[core] = str_replace("\\", "/", $folders[core]); } Quote Link to comment https://forums.phpfreaks.com/topic/124173-solved-fatal-error-function-name-must-be-a-string-in-cwwwpublic_htmlindexphp-on-l/ Share on other sites More sharing options...
wildteen88 Posted September 14, 2008 Share Posted September 14, 2008 This is the line that is causing the problems: if (is_array($folders(strpos($folders[core], '/') === FALSE))) { What are you trying to do with that line? Maybe it should be if (is_array($folders) && (strpos($folders[core], '/') === FALSE)) Quote Link to comment https://forums.phpfreaks.com/topic/124173-solved-fatal-error-function-name-must-be-a-string-in-cwwwpublic_htmlindexphp-on-l/#findComment-641088 Share on other sites More sharing options...
kenrbnsn Posted September 14, 2008 Share Posted September 14, 2008 On this line: <?php if (is_array($folders(strpos($folders[core], '/') === FALSE))) { ?> You are trying to use the variable $folders as a function call when it's really an array. You probably forgot something here. Ken Quote Link to comment https://forums.phpfreaks.com/topic/124173-solved-fatal-error-function-name-must-be-a-string-in-cwwwpublic_htmlindexphp-on-l/#findComment-641091 Share on other sites More sharing options...
bogdaniel Posted September 14, 2008 Author Share Posted September 14, 2008 thank you for you help. Quote Link to comment https://forums.phpfreaks.com/topic/124173-solved-fatal-error-function-name-must-be-a-string-in-cwwwpublic_htmlindexphp-on-l/#findComment-641130 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.