var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
modify all the index.html in one server
i'm looking about one script who put an additional line in all the accounts i host but i have no idea of programming shell, what i'm looking it's
1. start on /home
2. enter to all the directories for example /home/user1/www /home/user2/www
3. open the index.html and put my text on it and save
anyone did it before? anyone know any script who do that? thanks.
That's not hard to do
/* I assume you want to add a line at the end of index.html */
$f = fopen($dir.'/index.html', 'a');
fwrite($f, "\nYour text here\n");
$h = opendir($dir);
while(($file = readdir($h)) !== false)
if($file == '.' || $file == '..')
$file = $dir . '/' . $file;
I forgot to say two things:
1) it's not tested
2) call recurseOn('/home') to change all the index.html contained in a subdirectory of /home
yes, i get that errors;
./dale: line 1: syntax error near unexpected token `$dir'
./dale: line 1: `function treatDir($dir)'
First off, figure out where your php cli is by typing 'which php' in shell, most likeley it'll be #!/usr/local/bin/php. Although check and make sure... then just append that line to dale. Or you could just run it by typing "php dale" if php is in the local env too.
thanks for the info, but i'm going to try with mod_layout that seems more easy to do, i tell you if finally works, thanks.