Page 1 of 1

Embeded ASP in a PHP

Posted: Thu Feb 11, 2010 2:50 pm
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.

Re: Embeded ASP in a PHP

Posted: Thu Feb 11, 2010 3:20 pm
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.