er Posted October 8, 2006 Share Posted October 8, 2006 I am having a little trouble with a SSI on a website on which I'm working. I have used includes for easy editing. It works great on 1 page but If I take the EXACT same code to for another page my includes no longer work. What am I missing? Code Sample....[code]<?php include 'htmlstart.addin'; ?> <p><strong>1) Content here.</strong> column long long column very long fill <?php include 'htmlend.addin'; ?>[/code]I have even tried removing all the data from the includes and putting the full code in, which of course works great. So I put 1 include back in and it fails to show on the page.this link SHOULD show you what I'm running into... check the source please If I'm not making any sense....http://preview5.awardspace.com/executiverepair.com/ Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/ Share on other sites More sharing options...
.josh Posted October 8, 2006 Share Posted October 8, 2006 [code]<?php include 'htmlstart.addin'; ?> <p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <?php include 'htmlend.addin'; ?>[/code]that is the source code of plist.php when you click on services. see something wrong? Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105775 Share on other sites More sharing options...
er Posted October 8, 2006 Author Share Posted October 8, 2006 Other than the fact that I sortened the filler to make the post smaller. It is exactly the same as best I can tell as what I have in the Index.php for the same site. Is there something I'm missing? Thanks for the quick response.Here is the Index.php[code]<?php include 'htmlstart.addin'; ?> <p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> <?php include 'htmlend.addin'; ?>[/code]the code you posted is the code for the Services Link.I'm not real sure why I can't get includes to work on my other pages. I can replace all of the includes a with the code itself and only use includes for the footer. In which case the footer fails to decode. For some reason my includes are only working on the intial page. Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105904 Share on other sites More sharing options...
redarrow Posted October 8, 2006 Share Posted October 8, 2006 Try this see what happens.[code]<?php include ("htmlstart.addin"); ?> <p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> <?php include ("htmlend.addin"); ?>[/code]or[code]<?php include_once ("htmlstart.addin"); ?> <p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> <?php include_once ("htmlend.addin"); ?>[/code]or[code]<?php require ("htmlstart.addin"); ?> <p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> <?php require ("htmlend.addin"); ?>[/code]or[code]<?php require_once ("htmlstart.addin"); ?> <p><strong>1) Content here.</strong> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> column long long column very long fill fill fill long text text column text silly very make long very fill silly make make long make text fill very long text column silly silly very column long very column filler fill long make filler long silly very long silly silly silly long filler make column filler make silly long long fill very.</p> <p>very make make fill silly long long filler column long make silly silly column filler fill fill very filler text fill filler column make fill make text very make make very fill fill long make very filler column very long very filler silly very make filler silly make make column column </p> <p>fill long make long text very make long fill column make text very silly column filler silly text fill text filler filler filler make make make make text filler fill column filler make silly make text text fill make very filler column very </p> <p>column text long column make silly long text filler silly very very very long filler fill very fill silly very make make filler text filler text make silly text text long fill fill make text fill long text very silly long long filler filler fill silly long make column make silly long column long make very </p> <?php require_once ("htmlend.addin"); ?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105906 Share on other sites More sharing options...
alpine Posted October 8, 2006 Share Posted October 8, 2006 If you have the files for include in your root area, you must tell the include to go one step back to get them if your include page is in another directory.[code]<?phpinclude ("htmlend.addin"); // file is in the same directory as this fileinclude ("../htmlend.addin"); // file is one level down from this fileinclude ("../inc_dir/htmlend.addin"); // file is one level down and then inside "inc_dir"?>[/code]......unless i totally misunderstood your problem..... Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105908 Share on other sites More sharing options...
er Posted October 8, 2006 Author Share Posted October 8, 2006 THANKS!!! So if I see this correctly my whole issue was single quotes Vs double Quotes? Mental note made Thanks.The Page I'm posting is test page I was running online because I thought something was wrong with my PHP on My system ::) so the includes were in the same folder... But good Idea... Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105910 Share on other sites More sharing options...
alpine Posted October 8, 2006 Share Posted October 8, 2006 No, single or double - just a matter of habbit i guesshttp://no2.php.net/manual/fi/function.include.php Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105911 Share on other sites More sharing options...
er Posted October 8, 2006 Author Share Posted October 8, 2006 ok so now I'm lost again...<?php include ("htmlstart.addin"); ?><?php include 'htmlstart.addin'; ?> I see 2 differences ()' s and ""s and what is confusing me Is I actually tried using the ()s at one point still to no avail. Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105913 Share on other sites More sharing options...
.josh Posted October 8, 2006 Share Posted October 8, 2006 i was pointing out the fact that your php code was being displayed in your html source code. i view sourced and copy/pasted it here, from your site. Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105927 Share on other sites More sharing options...
er Posted October 8, 2006 Author Share Posted October 8, 2006 OK... yes I had noticed that as well... that was what was so confusing... On the index page it was properly catching the includes, but on the second page the includes we not being sustituted.Again Thanks to everyone for their help. Quote Link to comment https://forums.phpfreaks.com/topic/23333-php/#findComment-105933 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.