Solved

What is the PHP code for file location

Posted on 2007-11-22
6
1,424 Views
Last Modified: 2010-04-21
What is the php code to find where the file is located at on linux? like you know $_SERVER['location'];
0
Comment
Question by:fapathy
6 Comments
 
LVL 2

Accepted Solution

by:
HiTechFail earned 500 total points
ID: 20336773
Document_Root, not location.

$_SERVER['DOCUMET_ROOT'];
0
 

Author Closing Comment

by:fapathy
ID: 31410617
Thanks!
0
 
LVL 21

Expert Comment

by:nizsmo
ID: 20336774
are you looking for PHP_SELF?

echo $_SERVER["PHP_SELF"];
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Expert Comment

by:HiTechFail
ID: 20336789
On Linux, meaning where the file is on the operating system.

EG: \home\root\www\file.php

Document_Root would display current location like above.
0
 
LVL 20

Expert Comment

by:steelseth12
ID: 20336862
Reported for points passing . Have a nice day.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20336868
HiTech and fapathy,

Seems these accounts both come from the same place, and it seems that it is mis appropriation of the point system.

Can you please explain what you are doing?

Thanks

Computer101
EE Admin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Reference key in foreach loop 4 38
Wordpress and Wufoo 1 36
Length of for loop to be dynamic 2 31
php hashing methods 3 9
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question