| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2005
Posts: 11
|
File Upload path in PHP
Hi, Hope someone can help - this is probably a no brainer but here goes - I am learning php and I am currently working through an exercise to upload an image. I have example code but they have used a local machine so the line I need to change is :- $ImageDir = "C:/Program Files/Apache Group/Apache2/test/images/"; I am testing my stuff on lycos/tripod free hosting. My question is what do I need to change the line to to make it correct to my lycos server path. my domain is http://www.members.lycos.co.uk/wyvertest/ and I have just called my image directory "Images" but I am not at all sure what format the path should be in. Any help gratefully received Many thanks |
|
|
|
|
|
#2 (permalink) |
|
fucksocks™
Join Date: Jun 2005
Location: in the boosh
Posts: 1,615
|
first create a php file containing PHP Code:
name it phpinfo.php and upload it to your root directory. surf to that page in your web browser and scroll to the table at the bottom of the page. In that last table your find "_SERVER["DOCUMENT_ROOT"]" which shows the true server root of your website. Voila! |
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Jan 2005
Posts: 11
|
Hi, Thanks - I've tried that but can't see the "_SERVER["DOCUMENT_ROOT"]" anywhere in the table - I did a search on "root" on the page and all I can find are the following entries:- doc_root no value no value docref_root no value no value I also found :- include_path .:/data/apache/php/mmp_lib .:/data/apache/php/mmp_lib and theres also entries for sendmail etc but I cant find a server root - any other ideas? Thanks again |
|
|
|
#4 (permalink) |
|
fucksocks™
Join Date: Jun 2005
Location: in the boosh
Posts: 1,615
|
I just had a quick look in info.php in your root and it looks like your running a very limited version of php. You'll probably need to get some 'proper' paid hosting. I personally use mediatemple and xtreme-host but there's loads of others which people recommend. |
|
![]() |