Code subject: read php file in asp and display it as html
Posted: Tue Apr 05, 2011 9:28 pm
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2272 Location: Earth Has thanked: 39 time Have thanks: 61 time
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 %>
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )
Sopnerduar
Code subject: Re: read php file in asp and display it as html