I am working on a product catalog. The directory structure is 3 levels deep from the domain root.
So say for instance I have a product page for an orange. And the orange is in a sub category called citrus, which is in a category called fruit which is in a directory called products. so the real path to this page would be http://www.mydomain.com/products/fruit/citrus/orange.php
Now, how would I get only the following: /fruit/citrus/orange when running orange.php
I have tried : dirname(__FILE__); but this gives an output of http://www.mydomain.com/products/fruit/citrus/orange which includes the domain which I do not want.
Could anyone offer any suggestions or advice on how I could accomplish something like this?
Thank you!
1 Answer