Forum Moderators: coopster
I want to share a header and a footer between the ASP.NET site and the WordPress blog. This isn't too much of a problem, as you can just use the php include function to inject.
However, the header has ASP.NET code in it. It's not just a straight html file, there is server side processing that must take place. When I use the php include function, it's just injecting the actual unprocessed file right off the hard disk into the page, as opposed to processing it through the server.
I'm doing this:
<?php include("header.aspx")?>
Is there a way to inject an ASP.NET processed file into a PHP file?
(BTW, I wasn't sure if this is a PHP question or an ASP.NET question. I guess it's kind of both.)
It should do as you want if you include it as an uri like the following:
<?php include("http://www.example.com/includes/header.aspx");?>
This way the file will be executed by the server and you will only be including the output from that file instead of the code itself. In order to do this, however, you must make sure that the allow_url_fopen [us2.php.net] directive is set to true, otherwise this won't work.
good luck :)
[edited by: eelixduppy at 2:18 pm (utc) on Nov. 7, 2007]