Author |
Topic  |
ASPDude
Starting Member
United Kingdom
41 Posts |
Posted - 25 March 2003 : 04:53:01
|
I have a small PHP page that I wish to include in my portal_content.asp page. The PHP page is an RSS feeder that works perfectly by itself but when I include it in my portal_content.asp page all it displays is the PHP code.
I'm bringing the page in as such:
<!-- #include file="newsfeeds/onyx/onyx-test.php" -->
Now I'm not sure if this is how you call an PHP page into an ASP page (or if you can even do it) so any advice is welcome.
Thanx |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 25 March 2003 : 10:30:00
|
calling PHP into an ASP page? I don't think that is possible, and besides PHP includes look something like this:
<? include("file.php"); ?> |
|
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 25 March 2003 : 11:10:43
|
dayve is correct, you can't include a php page in an asp page. The asp interpreter doesn't know what to do with php code. Maybe an IFrame or something like asptear can get the contents of your php page (this assumes the php page is still on a php-enabled server somewhere).
|
====== Doug G ====== Computer history and help at www.dougscode.com |
Edited by - Doug G on 25 March 2003 11:11:16 |
 |
|
ASPDude
Starting Member
United Kingdom
41 Posts |
Posted - 25 March 2003 : 11:32:13
|
Thanx guys
Funny feeling that was going to be it. After I posted this I checked thru the archive again and found a similar plea from Ru55ian and he was told similar.
Sorry to have wasted time here guys, but at least I've learned my something new for today! |
 |
|
dayve
Forum Moderator
    
USA
5820 Posts |
Posted - 25 March 2003 : 12:53:37
|
I have an RSS Reader that I was using XML integrated within my forum, are you interested in using something like that? |
|
 |
|
ASPDude
Starting Member
United Kingdom
41 Posts |
Posted - 27 March 2003 : 11:20:54
|
dayve
Very much so. Could you either mail me or direct me to get the code.
S |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 27 March 2003 : 11:27:18
|
Couldn't you (assuming you had a recent version of IIS) have a server.execute("myfile.php") in an ASP file?
(not that I'd want to, but in theory it should work if the MIME type is correctly set.) |
 Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 27 March 2003 11:30:36 |
 |
|
ASPDude
Starting Member
United Kingdom
41 Posts |
Posted - 27 March 2003 : 11:29:03
|
Recent as in IIS4? |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 27 March 2003 : 11:31:55
|
Erm.. trying to remember when they added in the xtra server commands.... No, I think it would need to be ver.5 (always worth a try though eh!) |
 Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
 |
|
ASPDude
Starting Member
United Kingdom
41 Posts |
Posted - 27 March 2003 : 11:39:39
|
Didn't seem to impressed with that. Got the following:
Microsoft VBScript runtime error '800a01b6'
Object doesn't support this property or method: 'Execute'
/snitz34v3/portal_content.asp, line 134
|
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 27 March 2003 : 11:42:43
|
Yeah, that'll be because those methods weren't introduced until version 5 then. If someone else can confirm it works, it might be worth the upgrade. |
 Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 27 March 2003 11:43:44 |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 27 March 2003 : 14:55:00
|
server.execute and server.transfer were introduced in IIS5.0
Also, I doubt server.execute("my.php") would work. The documentation specifies that server.execute will execute an .asp file, not just any file. But you never know unless you try, I guess :)
|
====== Doug G ====== Computer history and help at www.dougscode.com |
 |
|
D3mon
Senior Member
   
United Kingdom
1685 Posts |
Posted - 27 March 2003 : 15:06:43
|
I'm pretty sure it should work as you can include an .htm(l) file which uses a different parser to ASP... So long as it only pushes HTML on to the outgoing stream it should be ok, but maybe that is where possible problems lie... |
 Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 27 March 2003 15:08:30 |
 |
|
Doug G
Support Moderator
    
USA
6493 Posts |
Posted - 27 March 2003 : 17:22:06
|
quote: Originally posted by D3mon
I'm pretty sure it should work as you can include an .htm(l) file which uses a different parser to ASP... So long as it only pushes HTML on to the outgoing stream it should be ok, but maybe that is where possible problems lie...
No, include files in asp are not parsed separately. The code from all include files are merged with the code on the starting page, then the entire results are parsed as if the code from the start page and all included pages were really just one large page.
html include pages work because asp pages by default can have html in them.
|
====== Doug G ====== Computer history and help at www.dougscode.com |
 |
|
ASPDude
Starting Member
United Kingdom
41 Posts |
Posted - 28 March 2003 : 03:16:10
|
Guys, thatx for all your help with this. D3Mon, we have every intention of building a new W2K Server with IIS5 on it and then migrating (thanx for the link above) but thtis is a while away yet (still waiting to see what WS2003 has to offer...may go direct).
Dayve, I'd appreciate it if you could give me a link to or mail me your code that you used on your site.
Thanx again. |
 |
|
Topic  |
|