Total members 11663 |It is currently Sat Sep 23, 2017 6:33 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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





Author:
Mastermind
User avatar Posts: 2707
Have thanks: 74 time

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++     -  
 Read and write CSV file     -  
 File write read     -  
 File read by char     -  
 javascript read file     -  
 Read and Write to file using ASP     -  



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