https://www.icyphoenix.com/viewtopic.php?f=30&t=477&p=4552#p4552
-----------------------------------
moreteavicar
Tue 07 Nov, 2006 16:01

Updated chmod script
-----------------------------------
[quote user="moreteavicar" post="4311"]The way this has been coded, it isn't dependent on its filename, so you can copy and paste it to the end of the install script if you wanted to.[/quote]

Sorry, forgot to say this isn't completely true. When in the install directory, you have to unccoment some of the lines at the top:
[codeblock]$str = dirname($_SERVER["PHP_SELF"]);  //gets the root directory of install
$arr = split('/', $str);
$num = count($arr);
$num = $num - 2;
$current_dir = $arr[$num];
[/codeblock]

And change all '.' to '..' in the bottom of the file. 

However, instead of anyone needing to do that, I've changed the script to even fully automate that part... 

So, to recap, it will run in root or install directory (or install_old if you rename it to that). You can call the root directory what you like, it will find the name of that directory (an important point since the ftp routine has to be called with respect to public_html).

And to use ftp only, change the line to $use_ftp=1; at the top of the file.


