Answer the question
In order to leave comments, you need to log in
How to rewrite this ASP code in PHP?
There is an ASP project consisting of:
1. asax file
public class MyImage : System.Web.HttpApplication
{
/* поля класса */
protected void Application_Start(object sender, EventArgs e)
{
/* код */
}
}
public class GetImage : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
/* код генерации изображения img*/
context.Response.ContentType = "image/png";
context.Response.BinaryWrite(img);
}
public bool IsReusable
{
get
{
return false;
}
}
}
<?PHP
/* код генерации изображения img*/
header('Content-type: image/png');
imagepng($img);
imagedestroy($img);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question