How can fso tell if a txt is empty in asp?

Updated on technology 2024-05-26
6 answers
  1. Anonymous users2024-02-11

    whichfile="")

    set fso = createobject("")set txt = ,1)

    while not

    rline ='Read a row.

    if left(rline,1)='a' thenb=split(rline," ",-1,1)'Use a space to truncate the ordinal number aa=b(1).

    bb=b(3)

    cc=b(5)

    dd=b(7)

    else changdu=len(rline)'Determine the length of a row a=split(rline," ",-1,1)'Use a space to truncate the ordinal id=trim(a(0)).'Use a space to truncate the ordinal number changdu2=len(id).'Length of serial number question=mid(rline,changdu2,changdu-changdu1-1).'Screenshot the question.

    answer=right(rline,1)end if

    sql="insert into "& Table.

  2. Anonymous users2024-02-10

    Check whether the file size is 0

  3. Anonymous users2024-02-09

    The paragraph on the previous page is written in the loop.

    set fs ="") 'Create an FSO object entity with the server and assign it to the FS

    set a = ""), true) 'Use the createtextfile method of fs to create a text file and assign it to a

    Write a line of text to the created text file A using the writeline method.

    Close the A-file.

  4. Anonymous users2024-02-08

    You can read out the entire contents of the file first, and then put the data you want to write in front of or after the readout content, combine it into a large string, and then write it to the original file in overwrite mode all at once. For example:

  5. Anonymous users2024-02-07

    'First, read the contents of the txt file through the FSO component, extract the user name, and assign a value to the variable un'Since you don't know the structure of your txt file, you can't give a specific **if un=username then

    The username matches! "

    The username doesn't match! "

    end if

  6. Anonymous users2024-02-06

    You work with the fso to read the contents of the txt file, and then use spilt to filter it.

    Pay attention to the encoding of the file,,And the BOM header,,If the encoding is different,There will be garbled characters,,If there is a txt of the BOM header,,ASP will also appear garbled when read out。。。

Related questions
7 answers2024-05-26

The following ** I wrote for you can accomplish such a function, but the specific content needs to be added by yourself, and you have to know a little HTML to do it: >>>More

20 answers2024-05-26

Hello, it's easy to tell the difference between a real smile and a fake smile. Generally, people who really smile will show a very cheerful appearance, and people who fake smiles generally laugh very stiffly, which belongs to the kind of bitter smile. In fact, the real smile and fake smile can be seen at a glance. >>>More

18 answers2024-05-26

That's a modifier, you can do it.

13 answers2024-05-26

A very simple way: don't be affected by the plot, don't rush into the play, see if the actor can take you into the play. As a simple example, imagine that you are walking on the street, and suddenly someone stops you, crying and begging you to help her, tears fall, at this time, if you feel that she has really suffered some kind of misfortune, I believe that she really needs help, and even her emotions are affected by her (for example, after listening to her experience, you feel strange and uncomfortable), and even ready to pay to help her, then this is a good actor (assuming she is an actor), on the contrary, if you are full of doubts about her, "She's a **, that expression, How do you think it's fake, no, you can't be deceived by her, hurry up", then she is undoubtedly a poor acting person.

10 answers2024-05-26

Slices can have two colons in three segments.

Similar to for loops in other languages. >>>More