- 1
while(!file_exists(getcwd()."/.htroot")){chdir('..');}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+167
while(!file_exists(getcwd()."/.htroot")){chdir('..');}
http://www.php.net/manual/en/function.require.php
if you want always include, require, open files using some 'root' folder based path you may may put file '.htroot' in 'root' folder and use this.
while(!file_exists(getcwd()."/.htroot")){chdir('..');}
This code change current dir to dir where '.htroot' file located and everywhere you can use relative to 'root' paths.
Please avoid absent of '.htroot' file.
ну они жеж чесно написале )
max_execution_time же
http://govnokod.ru/4865#comment56258