ASP ReadAll పద్ధతి
నిర్వచనం మరియు ఉపయోగం
ReadAll పద్ధతి మొత్తం టెక్స్ట్స్ట్రీమ్ ఫైల్ని పఠిస్తుంది మరియు ఫలితంగా స్ట్రింగ్ ని పునఃవ్రాసుతుంది.
ప్రకటనలు:ఈ పద్ధతి పెద్ద ఫైల్స్ కు సంబంధించి సరిపోదు (మెమరీ వనరులను వృధా చేస్తుంది).
సింథాక్స్:
TextStreamObject.ReadAll
ప్రతిస్పందన
<% dim fs,f,t,x set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.CreateTextFile("c:\test.txt") f.write("హలో వరల్డ్!") f.close set t=fs.OpenTextFile("c:\test.txt",1,false) x=t.ReadAll t.close Response.Write("The text in the file is: " & x) %>
输出:
The text in the file is: Hello World!