I have several product lines that come in kits of various configurations. Example: Product line 1 has 4 components, A, B, C, and D. Kit 1 includes A, B, and C. Kit Two includes A, B, and D. Kit 3 includes only A and D.
I want to have a file with a detailed description of each component -lets say a_desc.php, b_desc.php and so on, so in the description of Kit 3 I could have
<p> Kit 3 includes the following components:</p>
<?php
include("a_desc.php");
include("d_desc.php");
?>
That way I would only have to update the detailed description of a component in one place to have all kits updated.
I've tried this with my _desc.php file located in a couple of different directories and changing the php include statement to use every possible combination of directory info from just filename all the way out to http://...filename, and nothing has worked.
Questions:
1. Can this be done without more trouble than its worth? (If not, the rest of the questions don't matter, but I'd appreciate alternate suggestions.)
2. Where is the best place to put the -desc.php files to avoid troubles with permissions, and should they be .php or .html by name.
3. Should they be a standard html file format internally, or does there need to be any PHP tags or code added?
4. are the above example include statements the correct way to include these files in the description, or is there a better way? If these are the best way, any tips you could provide (especially regarding designating the path)would be appreciated.)
Bookmarks