wwwredback Posted May 8, 2011 Share Posted May 8, 2011 Dear All, I have just signed up to the forums so hello. I'm a complete novice to PHP and have a question. I've written a site using PHP but am stuck, how I have written is that certain pages use INCLUDE files that pull out information from .TXT files. The question I have is, is it possible to contain another INCLUDE link within the .TXT file? i.e. index.php includes companyname.txt but companyname.txt only has this line of text in it: <?php include("../includes/moreinformation.txt"); ?> I know it is quite a weird question/request but is there a way of doing this? So basically have an include within an include although the file extensions are .TXT. Thanks and looking forward to any help from you Pros. Kindest regards, James. James. Quote Link to comment https://forums.phpfreaks.com/topic/235878-php-include-help/ Share on other sites More sharing options...
Zurev Posted May 8, 2011 Share Posted May 8, 2011 No, .txt files aren't going to be run as php, you could have that txt file be a .php file and run it that way, nothing should change. Quote Link to comment https://forums.phpfreaks.com/topic/235878-php-include-help/#findComment-1212512 Share on other sites More sharing options...
spiderwell Posted May 8, 2011 Share Posted May 8, 2011 welcome james james, is that is really your name. lol I am pretty sure it will only work as long as any php code is in its php <?php ....?> brackets but if someone calls up that file in the browser, they will see the php code, which wouldnt happen if the file was a .php in the first place Quote Link to comment https://forums.phpfreaks.com/topic/235878-php-include-help/#findComment-1212515 Share on other sites More sharing options...
fugix Posted May 8, 2011 Share Posted May 8, 2011 yes its possibe...read this Quote Link to comment https://forums.phpfreaks.com/topic/235878-php-include-help/#findComment-1212528 Share on other sites More sharing options...
wwwredback Posted May 9, 2011 Author Share Posted May 9, 2011 Thanks for the help, I will try out your suggestion and let you know how I get on. Thanks a million. James Quote Link to comment https://forums.phpfreaks.com/topic/235878-php-include-help/#findComment-1212984 Share on other sites More sharing options...
fugix Posted May 9, 2011 Share Posted May 9, 2011 Thanks for the help, I will try out your suggestion and let you know how I get on. Thanks a million. James no problem, if you need anymore help with it just let us know! Quote Link to comment https://forums.phpfreaks.com/topic/235878-php-include-help/#findComment-1213016 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.