Jump to content

PHP Include Help


wwwredback

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/235878-php-include-help/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/235878-php-include-help/#findComment-1212515
Share on other sites

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.