By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,048 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

How to set-up a $default language.php?

P: 3
I'm still trying to sort out this annoying error message below, showing on my homepage:

Warning: chk_language() [function.include]: Failed opening 'language/.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/include/function.php on line 35

The cause of this error is my $default language is not configure properly and need some guidance on how to do it.

Please can someone help me to sort this problem out?
Mar 1 '07 #1
Share this Question
Share on Google+
1 Reply


ronverdonk
Expert 2.5K+
P: 4,258
You must (in your main code, i.e. outside the functions) fill the $default variable with the default language, i.e. the file name of the $default.php file that you want to include later.

In your chk_language() function you then set this variable to global scope and
Expand|Select|Wrap|Line Numbers
  1. global $default;
Ronald :cool:
Mar 2 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.