I have a program written in PHP whose functionality I'd like to fold in to my ASP program. I could port from PHP, or take the data it references and write my own api in ASP, but I'd like to see if they can be mixed in some way. It would save some time, if so.
Assumptions:
- I know that I can have classic ASP and PHP on the same Windows server.
- I know that I can do a response.redirect and a redirect header to move between classic ASP programs and PHP programs, but that they aren't really sharing data except via cookies or querystring, and in any case this introduces at least two browser reloads: this is not what I want.
- I know that I _cannot_ put ASP code into a PHP program, and vice versa.
So, I like to know if it is possible to call a PHP program from a classic ASP program, e.g.
<%
response.write "before the php program"
server.execute "helloWorld.php"
response.write "after the php program"
%>
Yes, I've tried it as written. No, it didn't work. I'm curious if there might be some method I don't know about.
Come to that, I could probably do a synchronous Ajax call, though it wouldn't be ideal. Thoughts?
For any future readers, every resource I've checked tells me that there simply isn't a way to mix the two technologies. They can both operate on the same server, but they can't interact directly.
In the end, I simply wrote a parser for the data file, loaded it into MSSQL Server, and moved on.
Assumptions:
- I know that I can have classic ASP and PHP on the same Windows server.
- I know that I can do a response.redirect and a redirect header to move between classic ASP programs and PHP programs, but that they aren't really sharing data except via cookies or querystring, and in any case this introduces at least two browser reloads: this is not what I want.
- I know that I _cannot_ put ASP code into a PHP program, and vice versa.
So, I like to know if it is possible to call a PHP program from a classic ASP program, e.g.
<%
response.write "before the php program"
server.execute "helloWorld.php"
response.write "after the php program"
%>
Yes, I've tried it as written. No, it didn't work. I'm curious if there might be some method I don't know about.
Come to that, I could probably do a synchronous Ajax call, though it wouldn't be ideal. Thoughts?
For any future readers, every resource I've checked tells me that there simply isn't a way to mix the two technologies. They can both operate on the same server, but they can't interact directly.
In the end, I simply wrote a parser for the data file, loaded it into MSSQL Server, and moved on.