Jump to content


- - - - -

RESOLVED: require_once - syntax help please


  • Please log in to reply
4 replies to this topic

#1 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 16 June 2010 - 08:37 AM

I am getting an error message, can someone please look at the code and see if it is correct, thanks

error message:

Quote

Warning: require_once(./cache/lang_cache/en/lang_email_content.php) [function.require-once]: failed to open stream: No such file or directory in /home/mysite/public_html/sources/classes/class_email.php on line 532


code from file 'class_email.php'
 

//-----------------------------------------

// Check and get

//-----------------------------------------



if ( ! file_exists($this->root_path."cache/lang_cache/$language/lang_email_content.php") )

{

if ( ! is_array( $lang ) )

{

$lang = array();

}

require_once( $this->root_path."cache/lang_cache/".$this->ipsclass->vars['default_language']."/lang_email_content.php" );

}

else

{

if ( ! is_array( $lang ) )

{

$lang = array();

}



require_once( $this->root_path."cache/lang_cache/$language/lang_email_content.php" );

}



line 532 being:
require_once( $this->root_path."cache/lang_cache/".$this->ipsclass->vars['default_language']."/lang_email_content.php" );




I tried changing
/".$this->ipsclass->vars['default_language']."/

to
/$language/



but it still causes the error message so any help appreciated

thanks in advance

Richard.


#2 DawPi

DawPi

    in search of lost time..

  • Modders
  • PipPipPipPipPipPipPipPipPip
  • 2,214 posts
  • Location:Cracow, Poland
  • Real Name:David
  • IPB Version:v3.2.x
Contributor

Posted 16 June 2010 - 08:54 AM

Do you have this file in each lang directories?
Dawid Pieron
intermedia - owner, developer and ip.board modder
Need custom mod, conversion service, any ip.board related job or support for any of my paid mods or services?
www | mail | facebook | twitter | buy licence

#3 RichardC

RichardC

    ^^ They think you are odd

  • IM Supporters
  • PipPipPipPipPipPipPipPip
  • 1,028 posts
  • Location:United Kingdom
  • Real Name:Richard
  • IPB Version:v2.3.x
Contributor

Posted 16 June 2010 - 10:53 AM

View PostDawPi, on Jun 16 2010, 09:54 AM, said:

Do you have this file in each lang directories?

I think I see what you are getting at :)

I had only a 'en' lang directory, I have just added a 'fr' lang directory and copied the 'en' content to it.

Now the code actually has more than 1 lang directory to choose from it works perfectly.

now if only the mod's other bugs and errors were so easy :)

thanks DawPi ;)

Richard

#4 DawPi

DawPi

    in search of lost time..

  • Modders
  • PipPipPipPipPipPipPipPipPip
  • 2,214 posts
  • Location:Cracow, Poland
  • Real Name:David
  • IPB Version:v3.2.x
Contributor

Posted 16 June 2010 - 11:21 AM

No problemo.. ;)
Dawid Pieron
intermedia - owner, developer and ip.board modder
Need custom mod, conversion service, any ip.board related job or support for any of my paid mods or services?
www | mail | facebook | twitter | buy licence

#5 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 16 June 2010 - 01:42 PM

The issue this topic was opened for has now been resolved. ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users