Adam Mason
asked on
Execute one PHP file from another
I currently have a webpage layout using 3 "frames" via PHP. Each "frame" read from a separate HTML file and arranged like this:
TOP BANNER
----------------
L |
E | MAIN
F | PAGE
T |
I want to allow the "main page" to be a mix of HTML and PHP code. I've tried readfile(), which outputs the HTML fine, but won't execute the PHP code. eval() only does one string/line at a time, and assumes everything is PHP code. passthru() doesn't give me any output.
TOP BANNER
----------------
L |
E | MAIN
F | PAGE
T |
I want to allow the "main page" to be a mix of HTML and PHP code. I've tried readfile(), which outputs the HTML fine, but won't execute the PHP code. eval() only does one string/line at a time, and assumes everything is PHP code. passthru() doesn't give me any output.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I thought I saw a way to do it a while back, but couldn't find it again on php.net
I was thinking it was like the C "#include"
Thanks for the quick answer.