1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

file permissions

Discussion in 'C#' started by t7584, Mar 16, 2006.

  1. #1
    file permissions
    this program must write string strInputSearch into a file(txt10.txt), but it doesn't work. What's wrong with it?
    is necessary to set file permissions as in php and perl

    Dim fso, MyFile

    Set fso = CreateObject("Scripting.FileSystemObject")

    Set MyFile= fs:confused:penTextFile("db/txt10.txt", 2)

    t7584, Mar 16, 2006 IP
  2. vectorgraphx

    vectorgraphx Guest

    Likes Received:
    Best Answers:
    Trophy Points:
    try setting an absolute path, i.e. instead of

    Set MyFile= fs:confused:penTextFile("db/txt10.txt", 2)


    Set MyFile= fs:confused:penTextFile("d:\inetpub\wwwroot\db\txt10.txt", 2)

    substituting the above path for the physical location of the file on your server.

    if you don't know the physical path to your website on your server, you can run this

    <%response.write  Request.ServerVariables("APPL_PHYSICAL_PATH")%>
    Code (markup):
    just copy that code into a text file and name it "path.asp" or something like that, drop it in the root of your web, and pull the page up in a browser, it should display the physical path.

    Barring all of this - if it still doesn't work - you'll need to grant IUSR_<insert server name here> change access to the directory and file you're trying to write to.


    vectorgraphx, Mar 16, 2006 IP