Switch to full style
ASP/ASP.net examples
Post a reply

read php file in asp and display it as html

Tue Apr 05, 2011 9:28 pm

read php file in asp and display it , read line by line to a php file .
Code:
<% 
'variables declaration   
Dim objFSystem , objFileStream , strContent 
'
content page
file 
= Server.MapPath("content.php") 
'file system object 
Set objFSystem = Server.CreateObject("Scripting.FileSystemObject") 
'
open stream.
Set objFileStream = objFSystem.OpenTextFile(file , 1 , False) 
'read the content of file until the end.
Do While Not objFileStream.AtEndOfStream
'
read line by line
strContent 
= objFileStream.ReadLine 
'display the content line by line .
Response.Write Server.HTMLEncode(strContent) & "<br>" 
Loop 
'
 close file  stream.
objFileStream.Close 
 delete use objects
.
Set objFileStream = Nothing 
Set objFSystem 
= Nothing 
%>
 




Re: read php file in asp and display it as html

Tue Feb 21, 2012 1:52 pm

That's rlealy thinking out of the box. Thanks!

Post a reply
  Related Posts  to : read php file in asp and display it as html
 Read two numbers from the keyboard and display larger number     -  
 display code block using html     -  
 display the content of text file     -  
 Read csv file     -  
 read from file in C++     -  
 Read and Write to file using ASP     -  
 Read Binary File in C++     -  
 read file in matlab     -  
 Read and write CSV file     -  
 File write read     -  

Topic Tags

ASP Files and I/O