CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Aug 2008
    Posts
    1

    Java script error in my cpanel being recognised by my admin panel

    I am getting an error in my admin panel to my website and therefore it wont let me compile my changes that I am making to other pages. In my cpanel, I have located the area of the error, but I am not very good at java script. Can someone please look at this cpanel script to see what is wrong:

    PHP Code:
    {
            $resKeysStrings = db_res("
                SELECT    `LocalizationKeys`.`Key` AS `Key`,
                        `LocalizationStrings`.`String` AS `String`
                FROM    `LocalizationStrings` INNER JOIN
                        `LocalizationKeys` ON
                        `LocalizationKeys`.`ID` = `LocalizationStrings`.`IDKey`
                WHERE `LocalizationStrings`.`IDLanguage` = {$arrLanguage['ID']}");
            
            $handle = fopen("{$dir['root']}langs/lang-{$arrLanguage['Name']}.php", 'w');
                 
                                    if($handle === false) return false;
            
            $fileContent = "<?{$newLine}\$LANG = array(";
            
            while($arrKeyString = mysql_fetch_assoc($resKeysStrings))
            {
                $langKey = str_replace("\\", "\\\\", $arrKeyString['Key']);
                $langKey = str_replace("'", "\\'", $langKey);
                
                $langStr = str_replace("\\", "\\\\", $arrKeyString['String']);
                $langStr = str_replace("'", "\\'", $langStr);
                
                $fileContent .= "{$newLine}\t'$langKey' => '$langStr',";
            }
    The following is the admin panel error message:

    Warning: fopen(/home/sexiestf/public_html/langs/lang-English.php) [function.fopen]: failed to open stream: Permission denied in /home/sexiestf/public_html/inc/languages.inc.php on line 159
    Language file(s) has NOT been compiled due to an error.
    Last edited by PeejAvery; August 25th, 2008 at 09:47 AM. Reason: Added PHP tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured