Where am I?

    Date: 07/14/05 (PHP Community)    Keywords: web

    Hello All.
    I am writing an app that emails a document located in a directory below the root of the website.

    site/documents/file.txt

    I want to be able to figure out what the path to the file is dynamically so that the app is portable.

    I am doing it this way for now and it seems to work.

    $x = pathinfo($_SERVER['SCRIPT_FILENAME']);

    $path = $x['dirname'] . '/docs/';

    Is this a correct method? How do you do it?

    Thanks.

    Source: http://www.livejournal.com/community/php/318984.html

« SQL Injection || GD Image creation Help »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home