Embeded ASP in a PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
devarishi
Forum Contributor
Posts: 101
Joined: Fri Feb 05, 2010 7:15 pm

Embeded ASP in a PHP

Post by devarishi »

Hi,


I tried to have an ASP run from within a PHP Page. But it sends the ASP / VBScript codes as they are to the Client/Browser.

So, can we use some other function or command instead of "echo" which can execute ASP/VBScript embedded within a PHP Page?

Code: Select all

<?php
 
$msg = "Hello PHP";
echo $msg;
 
 
echo '<%'  .
    
    'Response.Write "<p>Hello ASP</p>"' .
'%>';
 
echo "Okay!";
?>

Why I want to do that is because there is some functionality which I want to use through ASP/VBScript and am unable to achieve it using PHP. In fact, there are variables in PHP whoich I want to use in an embeded ASP to send emails. My PHP for email is not sending the Message Body. I have posted the problem in some other thread.
User avatar
JNettles
Forum Contributor
Posts: 228
Joined: Mon Oct 05, 2009 4:09 pm

Re: Embeded ASP in a PHP

Post by JNettles »

You cannot put ASP on a PHP page - PHP has no way of knowing to send your ASP through an ASP interpreter (and it certainly doesn't have one itself). If you're looking to use .NET functions in PHP then I suggest you look into using your compiled DLLs as PHP extensions or create web services.
Post Reply