1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

getting more then 1 file

Discussion in 'Facepalm' started by Teamblocket, Jul 22, 2017.

  1. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    how can i get more then one file? i also need to access all the files config :p please dont move to facepalm
     
  2. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    If you don't want to be in facepalm ,I think you should give us further information and what folder structure you really want?
     
    EdwardHamHam likes this.
  3. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    i don't want no folder structure i just need to get more then one file and their configs to, if your asking whats the folder structure for were to files are located here you go, /plugins/test/resources/test-folder/test1.php, test2.php, test3.php
     
  4. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    updated title my bad
     
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    "Get a file" is an invalid concept. Maybe tell us your scenario?
     
  6. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    Maybe you can take a look at the tutorial from @SOFe HERE
    PHP:
    $path $this->getPath();
    $file yaml_emit_file($path//brah);
     
  7. Marabou

    Marabou Baby Zombie

    Messages:
    137
    GitHub:
    wiligangster
    PHP:
            $dir "".$this->getDataFolder()."/folder/";
            
    $files scandir($dir);
            unset(
    $files[0],$files[1]);
            foreach(
    $files as $file){
            
    $contents file_get_contents($dir.$file);
          
    //  Blahhblahh ....
           
    }
    }
    With my code you can access to any folder and take the contents of file.
     
  8. Teamblocket

    Teamblocket Zombie

    Messages:
    301
    GitHub:
    teamblocket
    thanks
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.