Total members 11893 |It is currently Mon Nov 04, 2024 11:01 pm 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 
%>
 




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
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 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






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com