myvesta/bin/v-file-replace-string

18 lines
349 B
PHP

#!/usr/bin/php
<?php
include ("/usr/local/vesta/func/main.php");
include ("/usr/local/vesta/func/string.php");
myvesta_check_args (3, 'find replace file');
echo "Find: ".$find."\n";
echo "Replace: ".$replace."\n";
echo "File: ".$file."\n";
$r=myvesta_replace_in_file($find, $replace, $file);
if ($r) echo "Replacing done!\n";
myvesta_exit(0);