T
T
tigra2016-07-31 11:42:52
Yii
tigra, 2016-07-31 11:42:52

How to write the correct path?

I have the path site\protected\commands\file.php
I need to find the folder relative to the script being run
site\media\data
I managed to go up 2 levels, but now how do I go to media\data?
dirname(__FILE__) . '/../../'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kravchenko, 2016-07-31
@tigroid3

dirname(__FILE__) . '/../../media/data'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question