Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Directory Path

Status
Not open for further replies.

pete321

Technical User
Feb 18, 2004
4
US
i have users upload pictures to my website. These script is inside my public_html directory but the photos are loaded to a directory on the same level as public_html

meaning:
- script runs in:
<home path>/public_html/script.php

- photos are uploaded
<home path>/pictures/

i want to create thumbnails of the pictures using a script inside public_html so users can see if they uploaded the correct picture.

however, i have no idea how to code the pathway to the folder 'pictures'.

<img src="????/pictures/<name of picture>">

please help!
 
Don't mix up the following things:
Let's say your site is mysite.com
You have an image folder /images/, it is (from the browser's point of view) at
The web server has a document root, you called it <home path>

You can write the thumbnails to <home path>/images/ with you PHP script. Remember that PHP needs the full path to the file from the file system point of view. It does not take the web server's document root into consideration.

Ok?
 
how can i find out my home path?

would it be something like "/home/mysite/"?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top