Total members 11366 |It is currently Sat Oct 25, 2014 6:32 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R

All times are UTC [ DST ]



  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 
%>
 


_________________
Please recommend / share my post if you found it helpful.


Author:
Mastermind
User avatar Posts: 2694
Have thanks: 73 time
  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!


Author:
Post new topic Reply to topic  [ 2 posts ] 

  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++     -  
 File read by char     -  
 javascript read file     -  
 Read Binary File in C++     -  
 Read and Write to file using ASP     -  
 read file in matlab     -  

All times are UTC [ DST ]



Topic Tags

ASP Files and I/O






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team