PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('/code', RecursiveDirectoryIterator::SKIP_DOTS) ); foreach ($iterator as $info) { $pathname = $info->getPathname(); if (str_starts_with($pathname, '/code/vendor') || str_starts_with($pathname, '/code/templates') || !str_ends_with($pathname, '.php') ) { continue; } echo "\n" . \str_repeat('-', 80) . "\n"; echo $pathname . "\n"; echo \str_repeat('-', 80) . "\n"; $file = new \SplFileObject($pathname); while (!$file->eof()) { echo $file->fread(1024); } }
Show:  
Copy Clear