green_phanta
Erfahrenes Mitglied
Es geht!
Dankeschön an alle
greets green
Dankeschön an alle
greets green
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<?php
benennen('/img/');
benennen('/img1/');
benennen('/img2/');
benennen('/img3/');
$d= $ordner;
$h=opendir ($d);
function benennen($ordner)
{
while (false !== ($f = readdir ($h)))
{
if(is_file($d.$f) && preg_match('#.+\.(gif|png|jpe?g)$#i',$f))
{
if(!preg_match('#_icon\.(gif|png|jpe?g)$#i',$f))
{
$n=preg_replace('#^(.+)\.(gif|png|jpe?g)$#i','\\1_icon.\\2',$f);
if(rename($d.$f,$d.$n))
{
echo '<hr><strong>Umbenannt:</strong>'.$f.'->'.$n;
}
else
{
echo '<hr><strong>Fehler:</strong>'.$f;
}
}
}
}
closedir($h);
}
?>
Bekommst du eine Fehlermeldung oder tut es einfach nicht was du willst?Was ist daran falsch?
Warning: readdir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 17
Warning: closedir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 32
Warning: readdir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 17
Warning: closedir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 32
Warning: readdir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 17
Warning: closedir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 32
Warning: readdir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 17
Warning: closedir(): supplied argument is not a valid Directory resource in /usr/export/www/vhosts/funnetwork/hosting/partywien/#s/rwrite Kopie.php on line 32
supplied argument is not a valid Directory
$d= $ordner;
$h=opendir($d);
<?php
benennen('/img/');
benennen('/img1/');
benennen('/img2/');
benennen('/img3/');
function benennen($directory) {
$handler = opendir ($directory);
while (false !== ($file = readdir ($handler))) {
if(is_file($directory.$file) && preg_match('#.+\.(gif|png|jpe?g)$#i',$file)) {
if(!preg_match('#_icon\.(gif|png|jpe?g)$#i',$f)) {
$name = preg_replace('#^(.+)\.(gif|png|jpe?g)$#i','\\1_icon.\\2',$file);
if(rename($directory.$file,$directory.$name)) {
echo '<hr><strong>Umbenannt:</strong>'.$file.'->'.$name;
}else{
echo '<hr><strong>Fehler:</strong>'.$file;
}
}
}
}
closedir($handler);
}
?>