hamza Posted January 16, 2010 Share Posted January 16, 2010 i have iframe like <iframe id="rf" src="template_files/a.php" allowtransparency="true" class="templatedemo" frameborder="0" scrolling="auto"></iframe> problem is that when i include a.php in src it show nothing if i include a.htm then it show properly contents of a file. i want to include the a.php file which is not including please help me thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/ Share on other sites More sharing options...
greatstar00 Posted January 16, 2010 Share Posted January 16, 2010 did u tried to access template_files/a.php with a normal browser (without iframe, or frame) Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996206 Share on other sites More sharing options...
hamza Posted January 16, 2010 Author Share Posted January 16, 2010 did u tried to access template_files/a.php with a normal browser (without iframe, or frame) yeah with fire fox and IE i had tried <?php include "template_files/a.php"; ?> and with require as well. nothing happening plz help Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996207 Share on other sites More sharing options...
hamza Posted January 17, 2010 Author Share Posted January 17, 2010 i have got the main problem theme here is the code <?php $apple = '12$'; ?> <iframe id="rf" src="template_files/a.php" allowtransparency="true" class="templatedemo" frameborder="0" scrolling="auto"></iframe> a.php file contain <?php echo $apple; ?> the main problem is that $apple variable not displaying the value. plz tell me why it is not show value. Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996725 Share on other sites More sharing options...
wildteen88 Posted January 17, 2010 Share Posted January 17, 2010 Because variables do get passed between pages. You'll want to use include instead. Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996757 Share on other sites More sharing options...
hamza Posted January 17, 2010 Author Share Posted January 17, 2010 Because variables do get passed between pages. You'll want to use include instead. Actually iframe allowing me to scrolling on my template if i do not use iframe then it will not scroll down.so its necessory to use . Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996765 Share on other sites More sharing options...
wildteen88 Posted January 17, 2010 Share Posted January 17, 2010 Because variables do get passed between pages. You'll want to use include instead. Actually iframe allowing me to scrolling on my template if i do not use iframe then it will not scroll down.so its necessory to use . If you use iframe then any variables you define will not be available to a.php You don't have to use iframes to allow for scrolling. You should look into the overflow CSS property. Example <div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div><div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div> Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996769 Share on other sites More sharing options...
hamza Posted January 17, 2010 Author Share Posted January 17, 2010 Because variables do get passed between pages. You'll want to use include instead. Actually iframe allowing me to scrolling on my template if i do not use iframe then it will not scroll down.so its necessory to use . If you use iframe then any variables you define will not be available to a.php You don't have to use iframes to allow for scrolling. You should look into the overflow CSS property. Example <div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div><div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div> Actually i have got blog template in which iframe tag is used.and in that iframe tag a.htm i calling and i have change a.htm to a.php i must need to call the a.php file so i can run my code properly. if you know or can remove iframe from template and make it simple then plz .may i send u my template. its being kind of you if u help me. Quote Link to comment https://forums.phpfreaks.com/topic/188708-iframe-in-php/#findComment-996773 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.