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!

 

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.