lemmin Posted July 3, 2008 Share Posted July 3, 2008 No, the php tag is not in the included file. Does that mean that there isn't any PHP in the file? I am guessing there is (in which case you DO NEED the php tags) because it seems to me that there is a fatal error in the included file that is aborting the script processing (Something like "The XML page cannot be displayed," but is being suppressed by the server?). Could you post the code in your included file? On the other hand, if there is no parsable php in your included file, you should use echo file_get_contents() instead because it is much more efficient when it knows it doesn't need to parse the file. Quote Link to comment https://forums.phpfreaks.com/topic/112970-solved-trying-to-include/page/2/#findComment-581075 Share on other sites More sharing options...
jaxdevil Posted July 3, 2008 Author Share Posted July 3, 2008 No PHP in it at all. The plain file for the link I posted is this... <tr style="" class="mfgInfo"> <td class="productDetails" width="20%"><b>Product Name:</b> </td> <td class="productDetails" align="left"><b>Glass Door Refrigerator - Radius Front - 26 Cu. Ft.</b></td> </tr> <tr style=""> <td class="productDetails" width="20%"><b>Manufacturer Name:</b> </td> <td class="productDetails" align="left">True Mfg</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Product ID:</b> </td> <td class="productDetails">GDM-26RF</td> </tr> <tr style=""> <td class="productDetails"><b>Equivalents:</b> </td> <td class="productDetails">GDM26RF, FTC10, FTC-10, 9196, 598-GDM26RF, 200-GDM-26RF</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Manufacturer Part Number:</b> </td> <td class="productDetails">GDM-26RF</td> </tr> <tr style=""> <td class="productDetails"><b>Vendor Description:</b> </td> <td class="productDetails"><b>Refrigerator</b>/Merchandisers - <b>Radius</b> <b>Front</b> - 1 <b>Glass</b> <b>Door</b> - <b>26</b> <b>Cu.</b> <b>Ft.</b></td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Product Notes:</b> </td> <td class="productDetails"><b>Glass</b> <b>Door</b> <b>Refrigerator</b> - <b>Radius</b> <b>Front</b> - <b>26</b> <b>Cu.</b> <b>Ft.</b></td> </tr> <tr style=""> <td class="productDetails"><b>Voltage:</b> </td> <td class="productDetails">120V/1PH</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Dimension (L x W x H):</b> </td> <td class="productDetails"> 30 x 31.25 x 78.63 </td> </tr> <tr style=""> <td class="productDetails"><b>Shipping Weight:</b> </td> <td class="productDetails">321 lbs.</td> </tr> <tr style="" class="mfgInfo"> <td class="productDetails"><b>Product Weight:</b> </td> <td class="productDetails">325 lbs.</td> </tr> <tr style=""> <td class="productDetails"><b>Product Cube:</b> </td> <td class="productDetails">42.66</td> </tr> But remember, I posted this with all the " with the preceding forward slashes, and still no good, and I tried with just the word "one" with no quotes and that still no good. I am sure it has something to do with how I am calling the included file, where the variable is in the code. Quote Link to comment https://forums.phpfreaks.com/topic/112970-solved-trying-to-include/page/2/#findComment-581101 Share on other sites More sharing options...
jaxdevil Posted July 3, 2008 Author Share Posted July 3, 2008 No, the php tag is not in the included file. Does that mean that there isn't any PHP in the file? I am guessing there is (in which case you DO NEED the php tags) because it seems to me that there is a fatal error in the included file that is aborting the script processing (Something like "The XML page cannot be displayed," but is being suppressed by the server?). Could you post the code in your included file? On the other hand, if there is no parsable php in your included file, you should use echo file_get_contents() instead because it is much more efficient when it knows it doesn't need to parse the file. YOU ARE A GOD! The get contents worked (see the 3rd test page http://globalrestaurantequip.com/product3.php?restaurant_equipment=GDM-3 ) THAT WAS TOO MUCH!! Thank you lemmin!! Quote Link to comment https://forums.phpfreaks.com/topic/112970-solved-trying-to-include/page/2/#findComment-581107 Share on other sites More sharing options...
lemmin Posted July 3, 2008 Share Posted July 3, 2008 No problem. I think the problem might have been caused by the fact that you were using a hard url (including the http://) in the include. This means that it is going out to that server and downloading the file. Of course, since it is php, it is parsed first so instead of the code, you get the generated html; however, since you don't have any code in there, it seems possible that it would work, but in any case, it doesn't make sense to use include in this manner. That must be why file_get_contents() works! Quote Link to comment https://forums.phpfreaks.com/topic/112970-solved-trying-to-include/page/2/#findComment-581112 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.