virtual path problem

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default 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


    --



    Yang Li Ke Guest

  2. Similar Questions and Discussions

    1. virtual path is missing slash in contribute
      Dear sir, Iam using contribute 3, when i published a page, contribute is missing "/" "slash" in the page. for example page has path like this...
    2. Jrun virtual-mapping to UNC path
      Is it possible to set the <virtual-mapping><system-path> in the jrun-web.xml file to point to a UNC path? I want all of the .cfm files to reside...
    3. Virtual Path
      Hi, I have an application with a connection.asp document linking to the MS Access database Previously I have had the database ABOVE the ROOT and...
    4. Virtual Path from a class Object
      An object resides in memory. As such, there is no path, virtual or otherwise to it. -- HTH, Kevin Spencer Microsoft MVP ..Net Developer...
    5. Convert Physical path to Virtual path?
      We have a field that gets filled into a database that our ASP website pulls from. What we would like to be able to do is to take that path and...
  3. #2

    Default 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@sympatico.ca> wrote in message
    news:WYGdb.2615$ab5.64952@news20.bellglobal.com...
    > 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 ?
    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...


    Randell D. Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139