help finding working directory

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Colin

    help finding working directory

    Hi there. I have just got a new website. I have some VB.Net code that
    reads a text file. This works on my home computer. When I upload it to
    my website I need to know the path.

    <?php
    echo $_SERVER['PATH_TRANSLATE D'];
    ?>

    If I put the php file above (test.php) in the htdocs directory and
    navigate to http://www.mydomain.co.uk/test.php it tells me the path and
    I can then put this in front of the filename to open the file.

    System.IO.Direc tory.GetCurrent Directory does not give me the same
    result and therefore my program cannot find the file.

    What is the equivalent .Net function to the php above?

    Thank you
    Colin

  • Arne Janning

    #2
    Re: help finding working directory

    Hi Colin!

    "Colin" schrieb[color=blue]
    > System.IO.Direc tory.GetCurrent Directory does not give me the same
    > result and therefore my program cannot find the file.
    >
    > What is the equivalent .Net function to the php above?[/color]

    Have a look at Server.MapPath( ...):
    Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


    Cheers

    Arne Janning


    Comment

    Working...