Grab htmls results from a php statement?
I was wonder if there was a way to take the html results that was created from a php script and take that html code generated and put it inside another php script?
The problem I'm having is that I'm working inside a huge php script and I al开发者_C百科ways have errors when I'm working inside it. I want to make additions to the code, but it never works. Files aren't opening. However, when I work outside it and within the same folder, my code works.
So I'm thinking if there's an "Iframe" for php code or maybe I should use an iframe instead?
Can't you just use include or require to include the code from the other script?
- Create a function myFunction to output whatever html you want.
- Put that code in a file whatever.php
- Call include('whatever.php') from your other PHP file
- Call myFunction() and your html will be outputted.
精彩评论