Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have to upload images to my images directory. I am working on localhost yet. I know that I need to tell the physical path of images directory to upload the images. In my localhost I know that images directory physical path is "c:\wamp\www\mysite\images". But In a Production Environment How can I know that what is the physical path of images directory?
Posted
Updated 18-May-11 19:49pm
v2

Try this link[^] (number of ways mentioned, some might be of use to you).
 
Share this answer
 
I'd strongly recommend that you use your document root as your filesystem "anchor". Make all your (data, not code) paths relative to that - in PHP, it would be $_SERVER['DOCUMENT_ROOT'] (or $DOCUMENT_ROOT if the hosting provider has not turned register_globals off for security reasons). If you do this, then the "real" path to the files doesn't matter - you can find them no matter where your document root is.
For example, I look after a remotely hosted (Linux) website where the document root is /var/www/association/mysite I run a test copy of the site on a Windows machine, where the document root is c:\documents and settings\peter\docroot\mytestsite Because I use paths like $_SERVER['DOCUMENT_ROOT']/restricted/files both sites work the same, and I don't have to edit paths when I move stuff from one to the other.

Cheers,
Peter
If this answers your question, accept it. Vote anyway.

ps I'm assuming you are using Apache, on the basis of ..\wamp\.. in your path.

[edit] inserted ... has not turned ... [/edit]
 
Share this answer
 
v2
Comments
rashidfarooq 19-May-11 8:13am    
thanks for answering.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900