virtual path problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yang Li Ke

    virtual path problem

    hi,

    I have a script in a folder which simply creates a file in another dump
    folder

    /myscript/script.php
    /myscript/dumpfolder/

    but then i call this script from my index
    page which is in the root folder

    /index.php

    and it doesnt go to /myscript/dumpfolder/
    but it looks for the /dumpfolder/

    how can I always have the rigth path if
    I call this script from anywhere on my
    site ?

    Thank you very much !

    Yang


    --



  • Randell D.

    #2
    Re: virtual path problem

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet?
    "Yang Li Ke" <yanglike@sympa tico.ca> wrote in message
    news:WYGdb.2615 $ab5.64952@news 20.bellglobal.c om...[color=blue]
    > hi,
    >
    > I have a script in a folder which simply creates a file in another dump
    > folder
    >
    > /myscript/script.php
    > /myscript/dumpfolder/
    >
    > but then i call this script from my index
    > page which is in the root folder
    >
    > /index.php
    >
    > and it doesnt go to /myscript/dumpfolder/
    > but it looks for the /dumpfolder/
    >
    > how can I always have the rigth path if
    > I call this script from anywhere on my
    > site ?[/color]

    What has script.php got to do with your example above?

    Correct me if I am wrong - If you are in a directory path /my/directory/here
    and you want to run your script from there, and for it to look in
    /my/directory/dumpfolder then try using $_SERVER[DOCUMENT_ROOT] to help find
    your current root folder - it works for virtual hosts too...


    Comment

    Working...