Create testing PHP file: Unterschied zwischen den Versionen

Aus WikiStar
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „<syntaxhighlight lang="bash" style="font-size:9pt;"> bkp001.hr19:~ # cat phptest.sh #!/bin/bash WEBPATH=/home/www/web0/html PHPFILES=( "test.php" "test.php5" …“)
 
(kein Unterschied)

Aktuelle Version vom 19. Juni 2014, 07:31 Uhr

bkp001.hr19:~ # cat phptest.sh
#!/bin/bash
 
WEBPATH=/home/www/web0/html
PHPFILES=( "test.php" "test.php5" "test.php52" "test.php52gd" "test.php52-spez" "test.php53" "test.php53gd" "test.php53-spez" "test.php54" "test.php54gd" "test.php54-spez" "test.php55" "test.php55gd" )
 
for f in "${PHPFILES[@]}"
do
        if [ ! -f $WEBPATH/$f ]
        then
                printf "File $WEBPATH/%s NOT exist - to create it\n" "${f[@]}"
cat >> $WEBPATH/$f << EOF
<?
phpinfo();
?>
EOF
fi
chown web0:web0 $WEBPATH/test.php*
done