DT-Ahmad Posted March 13, 2009 Share Posted March 13, 2009 Hi, I am still learning my way with this beautiful language, and I do have a couple of issues really and I was unable to find answers to them on Google. Can I read a PHP file with PHP? Basically. This is the short story; I want to read a language file in the browser. The language file say.. english.php and its content is like this: <?php DEFINE('HELLO_TEXT', 'Hello!'); DEFINE('LOGIN_TEXT', 'Log In'); ?> Now if I assume the above code presents a file called english.php Is it possible to read/loop through values using PHP directly from the browser? I tried with fopen but I am just not sure if this is the correct way to read such file. Any input is greatly appreciated guys Link to comment https://forums.phpfreaks.com/topic/149243-readingwriting-php-file-with-php/ Share on other sites More sharing options...
DyslexicDog Posted March 13, 2009 Share Posted March 13, 2009 Just use include() Link to comment https://forums.phpfreaks.com/topic/149243-readingwriting-php-file-with-php/#findComment-783750 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.