Jump to content

How to Fix: Failed opening 'language/.php' for inclusion. Help


ukpapillon

Recommended Posts

Hi,

 

I use Video Share Entreprise script on VPS. I've been having a difficult time for the last couple of weeks to fix this php error message showing on my homepage:

 

Warning: chk_language(language/.php) [function.chk-language]: failed to open stream: No such file or directory in /home/videomy/public_html/include/function.php on line 35

 

Warning: chk_language(language/.php) [function.chk-language]: failed to open stream: No such file or directory in /home/videomy/public_html/include/function.php on line 35

 

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

 

 

I've asked help all over the net. Everyone's giving me different answers and none of them works.

 

You can see the error message on my home page @: http://www.videomyst.com ,and if you select Japanese on the language box on the top right, everything goes back to normal  ???

 

Below is the function.php code:

 

<?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");

}

}

 

 

Please help me to sort this out. If you need to see the whole code or other files, I can upload them.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.