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