J
J
Justin Bieber2016-06-23 14:24:58
css
Justin Bieber, 2016-06-23 14:24:58

What will this php code do?

I wanted to hang this .php on cron to clear the folder, but I'm afraid that it will delete the wrong one)

<?
  function full_del_dir ($directory)
  {
  $dir = opendir($directory);
  while(($file = readdir($dir)))
  {
    if ( is_file ($directory."/".$file))
    {
      unlink ($directory."/".$file);
    }
    else if ( is_dir ($directory."/".$file) &&
             ($file != ".") && ($file != ".."))
    {
      full_del_dir ($directory."/".$file);  
    }
  }
  closedir ($dir);
  rmdir ($directory);
  echo("Каталог успешно удален");
  }
  full_del_dir ("c:/temp")
?>

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Golubev, 2015-11-22
@Piocan-Alex

Obviously, on the site from which you want to copy the background, there are particles.js that you can put yourself on the link below, where you can configure different background options.
vincentgarreau.com/particles.js

V
Vitaly Emelyantsev, 2015-11-22
@Gambala

Play around with media queries:

background-size: 50px;
@media (min-width: 1200px) {
  background-size: 100px;
}

M
Mikhail Osher, 2016-06-23
@miraage

Если надо повесить на крон - напишите скрипт. Только будьте очень аккуратны.
rm -rf /path/to/directory

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question