Jump to content

Making a config file and languages file, without actually defining variables


xeronix

Recommended Posts

Hello All!

 

Well, I'll get down to the base of my question.

 

Right now, I'm designing a website to use a languages file and a config file.

 

I'm approaching it in the following method, which is the languages file has

<?PHP
define("APPLICATIONTOP","Website Name");
define("ETC","Whatever the content is");
?>

 

and am trying to echo it.

 

My method of inclusion is requiring the file in the top of my document, like

 

<?PHP include('ex.'); ?>

 

and I'm trying to simply echo it. However, it doesn't work.

 

My echo method is

 

<?PHP echo APPLICATIONTOP ?>

 

which would be between my <title></title> tags for the HTML.

 

Any ideas as to why it's not working?

 

Thanks!

 

  • 2 weeks later...

Ahhh that helped me so much.

 

I've also figured out how to keep the file as PHP without having to change it's extension, and that is to disable Apache's PHP module in the server.

 

Though, it's probably easier to just mount an invisible staticserve server and pull the file directly from there.

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.