473,405 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Php Error message on my homepage. Please help me

Hi,

I keep on getting an error message on my homepage. The header and footer disapear. Strangely if I select japenese on the language box on my homepage, everything goes to normal? Cannot find the source of the problem.
Error message below:

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

Im using VPS hosting for video share website. I don't understand what is the problem. Something to do with the language function.
Php function code below:
[php]
<?php
//CHECK HOTORNOT ADMINISTRATOR LOGIN
function chk_admin_login()
{
global $config;
if($_SESSION['AUID']!=$config[admin_name] || $_SESSION['APASSWORD']!=$config[admin_pass])
{
header("Location:$config[baseurl]/siteadmin/login.php");
exit;
}
}
//CHECK LANGUAGE SELECTED
function chk_language()
{
global $conn;

if ($_SESSION[lang] == 'english')
{
include("language/en_US.php");

}
elseif($_SESSION[lang] == 'japanese')
{
include("language/ja.php");
}
else
{
$sql="select * from sconfig where soption='language'";
$rs=$conn->execute($sql);
$default=$rs->fields[svalue];
include("language/$default.php");
}
}[/php]

Can someone help me here

Read the Posting Guidelines sta the top of this forum before you post anyting. Especially the part about enclosing shown code within php or code tags!!

moderator
Feb 21 '07 #1
2 1320
ronverdonk
4,258 Expert 4TB
You most probably have not set the variable $default, because the error is returned on that statement

[php]include("language/$default.php");[/php]

Ronald :cool:
Feb 21 '07 #2
Thank you ever so much Ronverdonk. I will try to sort this out
Feb 26 '07 #3

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

Similar topics

2
by: affiori | last post by:
Can anybody shed some light on this error? When I try to create tables for the database for phpnuke using the supplied sql file when i get toe "nuke_contactbook" table, I get back this: =========...
1
by: Spencer Hurst | last post by:
Hi, I have currently found an ASP based website that i developed about 3 years ago and am very keen to get it up and running, it's quite a simple site, however when i try to do anything with the...
2
by: VB Programmer | last post by:
I only have 1 set of <FORM> tags in my HTML file, but I keep getting this error. Any ideas? *********** A page can have only one server-side Form tag. Description: An unhandled exception...
1
by: mar-kav | last post by:
Hello, i'm a beginner so exuse me: i installed IIS 5.1, Framework1.1, vs .NET 2003 i put my web dir' in inetpub/wwwroot, tried to broows to my homepage under localhost & got this error message: ...
7
by: Tony Tone | last post by:
I am having trouble resolving this issue: Server Error in '/test' Application. -------------------------------------------------------------------------------- Compilation Error Description:...
2
by: arbpen | last post by:
I find it superfluous to have a 'Make Us Your Homepage' link/script, but there it is, I have boss who wants it. Anyway, this is the snippet that is throwing an error: <li style="border:0"><a...
3
by: bb nicole | last post by:
Below is my login function, it can work well, but after i include it at my homepage, the print message is in the login page... What should it do to make the print message invalid username or...
3
by: atyndall | last post by:
have a look for yourself, <REMOVED> (feel free to send emails) dont enter in the visual code (or enter it incorrectly) (or correctly) and see how all hell breaks loose (the loops of death!) where...
1
by: ewanm1 | last post by:
On opening IE7 I get a server application unavailable error instead of my homepage. If I click home or refresh my homepage then loads. I have tried numerous different sites, including intranet and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.