note 116514 added to function.opcache-compile-file

From: Date: Fri, 16 Jan 2015 07:55:38 +0000
Subject: note 116514 added to function.opcache-compile-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-201435@lists.php.net to get a copy of this message
<?php /** * Get files that specified suffix * @param $path * @param array $files * @return array */ // http://www.apieye.com/528.html function getfiles( $path , &$files = array() ) { if ( !is_dir( $path ) ) return null; $handle = opendir( $path ); while ( false !== ( $file = readdir( $handle ) ) ) { if ( $file != '.' && $file != '..' ) { $path2 = $path . '/' . $file; if ( is_dir( $path2 ) ) { getfiles( $path2 , $files ); } else { if ( preg_match( "/\.(php|php5)$/i" , $file ) ) { $files[] = $path2; } } } } return $files; } $files = getfiles('/png/www/example.com/public_html/app/wordpress'); $br = (php_sapi_name() == "cli") ? "\n" : "<br />"; foreach($files as $file){ opcache_compile_file($file); echo $file.$br; } ---- Server IP: 72.52.91.14 Probable Submitter: 113.12.145.140 ---- Manual Page -- http://php.net/manual/en/function.opcache-compile-file.php Edit -- https://master.php.net/note/edit/116514 Del: integrated -- https://master.php.net/note/delete/116514/integrated Del: useless -- https://master.php.net/note/delete/116514/useless Del: bad code -- https://master.php.net/note/delete/116514/bad+code Del: spam -- https://master.php.net/note/delete/116514/spam Del: non-english -- https://master.php.net/note/delete/116514/non-english Del: in docs -- https://master.php.net/note/delete/116514/in+docs Del: other reasons-- https://master.php.net/note/delete/116514 Reject -- https://master.php.net/note/reject/116514 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201435) next »