100+ results results for 'php opendir' (2119 ms)
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.1.6 or newer 6 * 125 126 if ( ! $current_dir = @opendir($path)) 127 { 179 180 if ($fp = @opendir($source_dir)) 181 { 231 232 if ($fp = @opendir($source_dir)) 233 { 240 241 // foreach (scandir($source_dir, 1) as $file) // In addition to being PHP5+, scandir() is simply not as fast 242 while (FALSE !== ($file = readdir($fp)))upload.php https://gitlab.com/plusplusminus/isissoftware | PHP | 245 lines
1<?php 2 7/** 8 * upload.php 9 * 138 if ( $cleanup_target_dir ) { 139 if ( is_dir( $target_dir ) && ( $dir = opendir( $target_dir ) ) ) { 140 while ( ( $file = readdir( $dir ) ) !== false ) { 195 // Read binary input stream and append it to temp file 196 $in = @fopen( 'php://input', 'rb' ); 197theme.php https://gitlab.com/x33n/respond | PHP | 363 lines
1<?php 2 17 // open themes direcotry 18 if($handle = opendir(APP_LOCATION.THEMES_FOLDER)){ 19class.utils.php https://gitlab.com/sokeara/Tribal_Education | PHP | 351 lines
1<?php 2// Exit if accessed directly 95 /** 96 * PHP_SAPI for fcgi requires a data flush of at least 256 97 * bytes every 40 seconds or else it forces a script hault 327 //FALL BACK: Windows XP has bug with glob, 328 //add secondary check for PHP lameness 329 if ($dh = opendir('.'))Theme_Manager.class.php https://gitlab.com/albert925/lading-ach | PHP | 381 lines
1<?php 2/* vim: set expandtab sw=4 ts=4 sts=4: */ 5 * @version $Id$ 6 * @package phpMyAdmin 7 */ 11 */ 12require_once './libraries/Theme.class.php'; 13 15 * 16 * @package phpMyAdmin 17 */ 206 // force a change of a dummy session variable to avoid problems 207 // with the caching of phpmyadmin.css.php 208 $_SESSION['PMA_Config']->set('theme-update', $this->theme->id); 236 237 if ($handleThemes = opendir($this->getThemesPath())) { 238 // check for themes directoryQpContentEncoderAcceptanceTest.php https://gitlab.com/techniconline/kmc | PHP | 156 lines
1<?php 2 2 3class Swift_Mime_ContentEncoder_QpContentEncoderAcceptanceTest extends \PHPUnit_Framework_TestCase 4{ 15 { 16 $sampleFp = opendir($this->_samplesDir); 17 while (false !== $encodingDir = readdir($sampleFp)) { 29 if (is_dir($sampleDir)) { 30 $fileFp = opendir($sampleDir); 31 while (false !== $sampleFile = readdir($fileFp)) { 62 { 63 $sampleFp = opendir($this->_samplesDir); 64 while (false !== $encodingDir = readdir($sampleFp)) { 74 if (is_dir($sampleDir)) { 75 $fileFp = opendir($sampleDir); 76 while (false !== $sampleFile = readdir($fileFp)) {files.php https://gitlab.com/webbroteam/satisfaction-mvc | PHP | 306 lines
3 * 4 * This file is part of phpFastCache. 5 * 14 15namespace phpFastCache\Drivers; 16 17use phpFastCache\Core\DriverAbstract; 18use phpFastCache\Exceptions\phpFastCacheDriverException; 19 58 * @return string 59 * @throws phpFastCacheDriverException 60 */ 254 if (!$dir) { 255 throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); 256 }Filesystem.php https://gitlab.com/Ltaimao/wecenter | PHP | 364 lines
1<?php 2/** 24/** Zend_Search_Lucene_Storage_Directory */ 25//require_once 'Zend/Search/Lucene/Storage/Directory.php'; 26 120 if (file_exists($path)) { 121 //require_once 'Zend/Search/Lucene/Exception.php'; 122 throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory'); 124 if (!self::mkdirs($path)) { 125 //require_once 'Zend/Search/Lucene/Exception.php'; 126 throw new Zend_Search_Lucene_Exception("Can't create directory '$path'."); 158 159 $dirContent = opendir( $this->_dirPath ); 160 while (($file = readdir($dirContent)) !== false) { 184 unset($this->_fileHandlers[$filename]); 185 //require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php'; 186 $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');Filesystem.php https://gitlab.com/yousafsyed/easternglamor | PHP | 364 lines
1<?php 2/** 24/** Zend_Search_Lucene_Storage_Directory */ 25#require_once 'Zend/Search/Lucene/Storage/Directory.php'; 26 120 if (file_exists($path)) { 121 #require_once 'Zend/Search/Lucene/Exception.php'; 122 throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory'); 124 if (!self::mkdirs($path)) { 125 #require_once 'Zend/Search/Lucene/Exception.php'; 126 throw new Zend_Search_Lucene_Exception("Can't create directory '$path'."); 158 159 $dirContent = opendir( $this->_dirPath ); 160 while (($file = readdir($dirContent)) !== false) { 184 unset($this->_fileHandlers[$filename]); 185 #require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php'; 186 $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');Filesystem.php https://gitlab.com/luisrepo/ClienteWS | PHP | 363 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Filesystem.php 23964 2011-05-03 14:20:58Z adamlundrigan $ 21 */ 24/** Zend_Search_Lucene_Storage_Directory */ 25require_once 'Zend/Search/Lucene/Storage/Directory.php'; 26 118 if (file_exists($path)) { 119 require_once 'Zend/Search/Lucene/Exception.php'; 120 throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory'); 122 if (!self::mkdirs($path)) { 123 require_once 'Zend/Search/Lucene/Exception.php'; 124 throw new Zend_Search_Lucene_Exception("Can't create directory '$path'."); 156 157 $dirContent = opendir( $this->_dirPath ); 158 while (($file = readdir($dirContent)) !== false) {php.js https://gitlab.com/juanito.abelo/nlmobile | JavaScript | 132 lines
23 atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__"), 24 builtin: keywords("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport echo print global static exit array empty eval isset unset die include require include_once require_once"), 25 multiLineStrings: true, 54 var htmlMode = CodeMirror.getMode(config, "text/html"); 55 var phpMode = CodeMirror.getMode(config, phpConfig); 56 82 return style; 83 } else if (isPHP && state.php.tokenize == null && stream.match("?>")) { 84 state.curMode = htmlMode; 103 var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), 104 php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur; 105 if (state.curMode == htmlMode) cur = htmlNew; 130 CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true}); 131 CodeMirror.defineMIME("text/x-php", phpConfig); 132})();PhpStreamWrapperInterface.php https://gitlab.com/geeta7/drupal | PHP | 228 lines
1<?php 2 4 * @file 5 * Contains \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface. 6 */ 12 * 13 * @see http://www.php.net/manual/class.streamwrapper.php 14 */ 66 * @see stream_select() 67 * @see http://php.net/manual/streamwrapper.stream-cast.php 68 */ 118 * 119 * @see http://www.php.net/manual/streamwrapper.stream-metadata.php 120 */ 152 * 153 * @see http://php.net/manual/streamwrapper.stream-seek.php 154 */WinFsStreamWrapper.php https://gitlab.com/oytunistrator/92five | PHP | 400 lines
1<?php // vi: set fenc=utf-8 ts=4 sw=4 et: 2/* 18 * 19 * See also https://code.google.com/p/php-wfio/ for a PHP extension 20 * and comments on http://www.rooftopsolutions.nl/blog/filesystem-encoding-and-php 70 71 function dir_opendir($path, $options) 72 {glob.cpp https://gitlab.com/iranjith4/hhvm | C++ | 271 lines
25// under MSVC. 26#include "hphp/util/portability/glob.h" 27 38 39#include "hphp/util/portability/fnmatch.h" 40#include "hphp/util/portability.h" 103 104 /* rely on opendir failing for nondirectory objects */ 105 dir = opendir(*d ? d : "."); 107 if (!dir) { 108 /* this is not an error -- we let opendir call stat for us */ 109 if (error == ENOTDIR) return 0;CFileHelper.php https://gitlab.com/dwi.nurhadi17/uns-log | PHP | 311 lines
1<?php 2/** 21 * Returns the extension name of a file path. 22 * For example, the path "path/to/something.php" would return "php". 23 * @param string $path the file path 140 141 $folder=opendir($src); 142 while(($file=readdir($folder))!==false) 181 $list=array(); 182 $handle=opendir($dir); 183 while(($file=readdir($handle))!==false) 237 * @param string $magicFile name of a magic database file, usually something like /path/to/magic.mime. 238 * This will be passed as the second parameter to {@link http://php.net/manual/en/function.finfo-open.php finfo_open}. 239 * Magic file format described in {@link http://linux.die.net/man/5/magic man 5 magic}, note that this file does not 239 * Magic file format described in {@link http://linux.die.net/man/5/magic man 5 magic}, note that this file does not 240 * contain a standard PHP array as you might suppose. Specified magic file will be used only when fileinfo 241 * PHP extension is available. This parameter has been available since version 1.1.3.template.php https://gitlab.com/mhd_alhuda/megablogging-v5 | PHP | 224 lines
10 <title>Templates - Admin Megablogging</title> 11 <?PHP require_once(dirname(__FILE__)."/inc/css.php"); ?> 12 <link rel='stylesheet' type='text/css' href='assets/css/fileinput.css'/> 15 <div id="wrapper" <?PHP echo $c_sidebar_set; ?>> 16 <?PHP require_once(dirname(__FILE__)."/inc/navbar.php"); ?> 17 <?PHP require_once(dirname(__FILE__)."/inc/sidebar.php"); ?> 155 <ul class="styled-list"> 156 <?PHP require_once("inc/php.ini.php"); ?> 157 <li>Allowed extension only <span class='text-danger'>zip</span></li> 169 </div><!-- /main-container --> 170 <?PHP require_once(dirname(__FILE__)."/inc/footer.php"); ?> 171 </div><!-- /wrapper --> 172 <a href="#" id="scroll-to-top" class="hidden-print"><i class="fa fa-chevron-up"></i></a> 173 <?PHP require_once(dirname(__FILE__)."/inc/js.php"); ?> 174 <script type='text/javascript' src='assets/js/fileinput.min.js'></script>list_functions.php https://gitlab.com/endomorphosis/fusenews | PHP | 127 lines
1<?php 2 3function list_jumps() { 4 global $phpiCal_config, $lang, $cal; 5 $calName = join(',', array_map("getCalendarName", split(',', $cal))); 5 $calName = join(',', array_map("getCalendarName", split(',', $cal))); 6 $today = date('Ymd', time() + $phpiCal_config->second_offset); 7 $return = '<option value="#">'.$lang['l_jump'].'</option>'; 7 $return = '<option value="#">'.$lang['l_jump'].'</option>'; 8 $return .= '<option value="day.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_goday'].'</option>'; 9 $return .= '<option value="week.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_goweek'].'</option>'; 9 $return .= '<option value="week.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_goweek'].'</option>'; 10 $return .= '<option value="month.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_gomonth'].'</option>'; 11 $return .= '<option value="year.php?cal='.$calName.'&getdate='.$today.'">'.$lang['l_goyear'].'</option>'; 15function list_calcolors() { 16 global $phpiCal_config, $master_array; 17 $return = '';AbstractSyncBuilder.php https://gitlab.com/x33n/respond | PHP | 435 lines
1<?php 2/** 22use Aws\S3\S3Client; 23use Aws\S3\Iterator\OpendirIterator; 24use Guzzle\Common\Event; 402 * 403 * @return OpendirIterator 404 */ 409 410 // Calculate the opendir() bucket and optional key prefix location 411 $dir = "s3://{$this->bucket}"; 415 416 // Use opendir so that we can pass stream context to the iterator 417 $dh = opendir($dir, stream_context_create(array( 427 428 // Add the trailing slash for the OpendirIterator concatenation 429 if (!$this->keyPrefix) {perl.php https://gitlab.com/billyprice1/php-pastebin-v3 | PHP | 167 lines
1<?php 2/************************************************************************************* 2/************************************************************************************* 3 * perl.php 4 * -------- 84 'localtime', 'log', 'lstat', 'm', 'map', 'mkdir', 'msgctl', 'msgget', 85 'msgrcv', 'msgsnd', 'my', 'next', 'no', 'oct', 'open', 'opendir', 86 'ord', 'our', 'pack', 'package', 'pipe', 'pop', 'pos', 'print',list.php https://gitlab.com/florianocomercial/centreon | PHP | 134 lines
1<?php 2/** 39 40require_once _CENTREON_PATH_ . "www/class/centreonWidget.class.php"; 41require_once _CENTREON_PATH_ . "www/class/centreonUtils.class.php"; 53 54$handle = opendir(_CENTREON_PATH_ . 'www/widgets/'); 55$widgets = array(); 90<script type='text/javascript'> 91var installConfirmMsg = '<?php echo _('Would you like to install this widget?');?>'; 92var uninstallConfirmMsg = '<?php echo _('Are you sure you want to uninstall this widget?');?>'; 92var uninstallConfirmMsg = '<?php echo _('Are you sure you want to uninstall this widget?');?>'; 93var upgradeConfirmMsg = '<?php echo _('Would you like to upgrade this widget?');?>'; 94var p = '<?php echo $p;?>'; 118 dataType: "xml", 119 url : "./include/options/oreon/widgets/action.php", 120 data : {index.php https://gitlab.com/novadeviator/distrokid-analytics | PHP | 226 lines
58 59 <?php 60 64 if (is_dir($dir)) { 65 if ($dh = opendir($dir)) { 66 while (($file = readdir($dh)) !== false) { 105 // include misspellings group file, if it exists 106 //$groups = "groups.php"; 107 //file_exists($groups) AND include $groups; 123 124 <tr><td colspan=2><?php echo $tableseparator; ?></td></tr> 125 <tr><th>TITLES</th><th></th></tr> 125 <tr><th>TITLES</th><th></th></tr> 126 <?php 127 foreach ($titles as $key => $val){sqlite.php https://gitlab.com/webbroteam/satisfaction-mvc | PHP | 484 lines
9 * 10 * @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> http://www.phpfastcache.com 11 * @author Georges.L (Geolim4) <contact@geolim4.com> 14 15namespace phpFastCache\Drivers; 16 16 17use phpFastCache\Core\DriverAbstract; 18use PDO; 19use PDOException; 20use phpFastCache\Exceptions\phpFastCacheDriverException; 21 23 * Class sqlite 24 * @package phpFastCache\Drivers 25 */server.php https://gitlab.com/sokeara/Tribal_Education | PHP | 185 lines
25 $dup_tests['PHP']['SAFE_MODE'] = $safe_ini != 'on' || $safe_ini != 'yes' || $safe_ini != 'true' || ini_get("safe_mode") != 1 ? 'Pass' : 'Fail'; 26 $dup_tests['PHP']['VERSION'] = DUP_Util::$on_php_529_plus ? 'Pass' : 'Fail'; 27 $dup_tests['PHP']['ZIP'] = class_exists('ZipArchive') ? 'Pass' : 'Fail'; 74 $php_test1 = ini_get("open_basedir"); 75 $php_test1 = empty($php_test1) ? true : false; 76 $php_test2 = ini_get("max_execution_time"); 76 $php_test2 = ini_get("max_execution_time"); 77 $php_test2 = ($php_test2 > DUPLICATOR_SCAN_TIMEOUT) || (strcmp($php_test2 , 'Off') == 0 || $php_test2 == 0) ? true : false; 78 $php_test3 = function_exists('mysqli_connect'); 82 $checks['SRV']['PHP']['mysqli'] = $php_test3; 83 $checks['SRV']['PHP']['ALL'] = ($php_test1 && $php_test2 && $php_test3) ? 'Good' : 'Warn'; 84 134 return array( 135 DUPLICATOR_INSTALL_PHP => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_PHP, 136 DUPLICATOR_INSTALL_BAK => DUPLICATOR_WPROOTPATH . DUPLICATOR_INSTALL_BAK,captcha_helper.php https://gitlab.com/exabyte-lab/tiffinbox | PHP | 341 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 6 * 109 110 $current_dir = @opendir($img_path); 111 while ($filename = @readdir($current_dir)) 131 132 // PHP7 or a suitable polyfill 133 if (function_exists('random_int')) 234 // Create image 235 // PHP.net recommends imagecreatetruecolor(), but it isn't always available 236 $im = function_exists('imagecreatetruecolor')wpseo-non-ajax-functions.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 181 lines
1<?php 2 5 6 $dir = @opendir( $path ); 7 if ($dir) { 10 if( in_array($entry, $allowed_plugins) && is_readable($full_dir_path) && is_dir($full_dir_path) ) { 11 $module_dir = @opendir( $full_dir_path ); 12 if ($module_dir) { 13 while (($module_entry = @readdir($module_dir)) !== false) { 14 if (strrchr($module_entry, '.') === '.php') { 15 require $full_dir_path . '/' . $module_entry; 87 88 require_once (ABSPATH . 'wp-admin/includes/class-pclzip.php'); 89 112 113 $wp_admin_bar->add_menu( array( 'id' => 'wpseo-menu', 'title' => __( 'SEO' ), 'href' => get_admin_url('admin.php?page=wpseo_dashboard'), ) ); 114FsExplorer.class.php https://gitlab.com/endomorphosis/jeffersonsmithmayor | PHP | 297 lines
1<?php 2/** 21 22class_exists('org_tubepress_impl_classloader_ClassLoader') || require dirname(__FILE__) . '/../classloader/ClassLoader.class.php'; 23org_tubepress_impl_classloader_ClassLoader::loadClasses(array( 75 $toReturn = array(); 76 if ($handle = opendir($dir)) { 77 120 $toReturn = array(); 121 if ($handle = opendir($dir)) { 122calendar_functions.php https://gitlab.com/endomorphosis/fusenews | PHP | 277 lines
21 unset($http_user); 22 if ((isset($_SERVER['PHP_AUTH_USER'])) && ($phpiCal_config->allow_login == 'yes')) { 23 $http_user = $_SERVER['PHP_AUTH_USER']; 70 // used to identify the calendar filename. 71 if ($find_all || $phpiCal_config->recursive_path == 'yes' || $phpiCal_config->support_ical == 'yes') { 72 // Open the directory. 101 if (!is_file($file)) continue; 102 // Remove any php files. 103 if (preg_match("/^.*\.php$/i", $file)) continue; 270 if ($cal == $phpiCal_config->ALL_CALENDARS_COMBINED) { 271 $return .= "<option value=\"$current_view.php?cal=$phpiCal_config->ALL_CALENDARS_COMBINED&getdate=$getdate\" selected=\"selected\">$all_cal_comb_lang</option>"; 272 } else { 272 } else { 273 $return .= "<option value=\"$current_view.php?cal=$phpiCal_config->ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; 274 }tools_webftp.php git://github.com/FSB/Fire-Soft-Board-2.git | PHP | 555 lines
64 */ 65 public $edit_file = array('php', 'php3', 'php4', 'php5', 'htm', 'html', 'tpl', 'txt', 'css', 'js', 'xml', 'rss', 'htaccess'); 66 113 'mode' => array( 114 'highlight_php' => 'page_php_highlight', 115 'codepress' => 'page_codepress', 192 { 193 $u_dir = sid('index.' . PHPEXT . '?p=tools_webftp&mode=highlight_php&dir=' . $this->dir . '&phpfile=' . $value['name']); 194 } 219 * Converti des permissions (octal) en permissions symboliques (rwx) 220 * http://fr.php.net/manual/fr/function.fileperms.php 221 * 497 { 498 $phpfile = Http::request('phpfile'); 499 if (file_exists(ROOT . $this->dir . $phpfile))display-debug.page.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 355 lines
1<?php 2/** 13 global $wpdb; 14 $fixpage = get_option('siteurl').'/wp-admin/admin.php?page=wpsc-sales-logs&subpage=upgrade-purchase-logs'; 15 ?> 49 <li> 50 <a href='?page=wpsc-debug&wpsc_debug_action=phpinfo'>Display phpinfo</a> 51 </li> 58 <li> 59 <a href='<?php echo $fixpage; ?>'>Fix Purchaselogs</a> 60 </li> 61 </ul> 62 <?php 63 if (defined('WPSC_ADD_DEBUG_PAGE') && (constant('WPSC_ADD_DEBUG_PAGE') == true)) { 82 </ul> 83 <?php 84 }SMTP.php https://gitlab.com/staging06/myproject | PHP | 452 lines
1<?php 2 10 11require_once dirname(__FILE__) . "/../ClassLoader.php"; 12Swift_ClassLoader::load("Swift_ConnectionBase"); 211 * See the constants ENC_TLS, ENC_SSL and ENC_OFF 212 * NOTE: PHP needs to have been compiled with OpenSSL for SSL and TLS to work 213 * NOTE: Some PHP installations will not have the TLS stream wrapper 356 $dir = dirname(__FILE__) . "/../Authenticator"; 357 $handle = opendir($dir); 358 while (false !== $file = readdir($handle)) 359 { 360 if (preg_match("/^[A-Za-z0-9-]+\\.php\$/", $file) && $file != "index.php") 361 {PackageScaffolderAbstract.php https://gitlab.com/gregtyka/SiberianCMS | PHP | 249 lines
1<?php 2/** 49 } 50 file_put_contents('php://stderr', $message . ($newLine ? "\r\n" : '')); 51 } 62 $phar->extractTo($path); 63 @unlink($path . '/index.php'); 64 @unlink($path . '/build.bat'); 214 if (is_dir($path) ) { 215 $handleDir = @opendir($path); 216 }istorage.php https://gitlab.com/wuhang2003/core | PHP | 457 lines
83 /** 84 * see http://php.net/manual/en/function.opendir.php 85 * 92 /** 93 * see http://php.net/manual/en/function.is-dir.php 94 * 194 /** 195 * see http://php.net/manual/en/function.file_exists.php 196 * 212 /** 213 * see http://php.net/manual/en/function.file_get_contents.php 214 * 231 /** 232 * see http://php.net/manual/en/function.unlink.php 233 *archive.php https://gitlab.com/endomorphosis/go_event_reg | PHP | 193 lines
1<?php 2// copies files to archive directory. Appends file date and replaces folders delimiters with @ signs 57 if (!empty($excludestr)) $exclude_strings = explode(',',$excludestr); 58 $dir = opendir("$url/"); 59 while (false !== ($file = readdir($dir))) { 89<head> 90 <title>Archive — <?php echo $TITLE; ?></title> 91 <style type="text/css"> 104 105<form method="post" action="<?php echo $REQUEST_URI; ?>"> 106<div id="info"> 106<div id="info"> 107<?php 108 $info = "<b>FROM:</b> $FOLDER_TO_ARCHIVE<br /><b>TO:</b> $ARCHIVE_FOLDER"; 115<input type="submit" value="List Archive" name="LISTARCHIVE" /> 116<input type="text" value="<?php echo $INCLUDE; ?>" name="INCLUDE" /> 117</div>Zip.php https://gitlab.com/MichelZuniga/neoinvoice | PHP | 359 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 4.3.2 or newer 6 * 21 * This class is based on a library I found at Zend: 22 * http://www.zend.com/codex.php?id=696&single=1 23 * 237 { 238 if ($fp = @opendir($path)) 239 { 357 358/* End of file Zip.php */ 359/* Location: ./system/libraries/Zip.php */ExportController.php https://gitlab.com/klausmig/CloudSemanticWeb | PHP | 319 lines
1<?php 2 2 3include_once(ROOT . DS . "libraries" . DS . "backend" . DS . "CreateZipFile" . DS . "CreateDirZip.php"); 4include_once(ROOT . DS . "libraries" . DS . "backend" . DS . "pclzip" . DS . "pclzip.lib.php"); 13 if (get_class ( $element ) == "Slide") { 14 $slides_to_string = $slides_to_string.'<div class="slide" id="tree-'.$element->deck.'-slide-'.$element->id.'-'.$element->position.'-view">'.$element->content.'</div>'.PHP_EOL; 15 }else{ 62 if(file_exists($path) && is_dir($path)){ 63 $dirHandle = opendir($path); 64 while (false !== ($file = readdir($dirHandle))){ 250 <script src=\"codemirror/mode/css/css.js\"></script> 251 <script src=\"codemirror/mode/php/php.js\"></script> 252 <script src=\"codemirror/mode/ntriples/ntriples.js\"></script>ThemeManager.php https://gitlab.com/trungthao379/phpmyadmin | PHP | 528 lines
1<?php 2/* vim: set expandtab sw=4 ts=4 sts=4: */ 3/** 4 * phpMyAdmin theme manager 5 * 5 * 6 * @package PhpMyAdmin 7 */ 12/** 13 * phpMyAdmin theme manager 14 * 14 * 15 * @package PhpMyAdmin 16 */ 265 // force a change of a dummy session variable to avoid problems 266 // with the caching of phpmyadmin.css.php 267 $GLOBALS['PMA_Config']->set('theme-update', $this->theme->id);Zip.php https://gitlab.com/rbe/listaTareas | PHP | 484 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 6 * 43 * This class is based on a library I found at Zend: 44 * http://www.zend.com/codex.php?id=696&single=1 45 * 346 $path = rtrim($path, '/\\').DIRECTORY_SEPARATOR; 347 if ( ! $fp = @opendir($path)) 348 {PhpThumb.inc.php https://gitlab.com/julienv/joomleague | PHP | 247 lines
2/** 3 * PhpThumb Library Definition File 4 * 7 * PHP Version 5 with GD 2.0+ 8 * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com> 9 * Copyright (c) 2009, Ian Selby/Gen X Design 17 * @copyright Copyright (c) 2009 Gen X Design 18 * @link http://phpthumb.gxdlabs.com 19 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 27/** 28 * PhpThumb Object 29 * 36 * can't create one via the new keyword): 37 * <code>$pt = PhpThumb::getInstance();</code> 38 *Stream.php https://gitlab.com/grayhamster/open-social-media-monitoring | PHP | 565 lines
1<?php 2/** 19 * @license http://todo name_todo 20 * @version $Id: Stream.php 24594 2012-01-05 21:27:01Z matthew $ 21 */ 25 */ 26require_once 'Zend/Service/WindowsAzure/Storage/Blob.php'; 27 30 */ 31require_once 'Zend/Service/WindowsAzure/Exception.php'; 32 520 */ 521 public function dir_opendir($path, $options) 522 {ChainedBlockStream.php https://gitlab.com/digaotinfo/agendaLegislativa | PHP | 230 lines
20 * 21 * @category PHPExcel 22 * @package PHPExcel_Shared_OLE 28/** 29 * PHPExcel_Shared_OLE_ChainedBlockStream 30 * 31 * Stream wrapper for reading data stored in an OLE file. Implements methods 32 * for PHP's stream_wrapper_register(). For creating streams using this 33 * wrapper, use PHPExcel_Shared_OLE_PPS_File::getStream(). 34 * 35 * @category PHPExcel 36 * @package PHPExcel_Shared_OLE 165// $eof = $this->pos >= strlen($this->data); 166// // Workaround for bug in PHP 5.0.x: http://bugs.php.net/27508 167// if (version_compare(PHP_VERSION, '5.0', '>=') &&Ftp.php https://gitlab.com/MichelZuniga/neoinvoice | PHP | 618 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 4.3.2 or newer 6 * 425 426 // Permissions can only be set when running PHP 5 427 if ( ! function_exists('ftp_chmod')) 489 // Open the local file path 490 if ($fp = @opendir($locpath)) 491 { 559 'text', 560 'php', 561 'phps', 561 'phps', 562 'php4', 563 'js',GlobTest.php https://gitlab.com/gregtyka/frankenserver | PHP | 359 lines
36 $handle = uniqid(); 37 $this->expectOpenDir($path, $handle); 38 $this->expectReadDir($handle, $files); 145 // Match the semantics of glob as observed in 146 // https://github.com/php/php-src/blob/master/ext/standard/tests/file/glob_error.phpt 147 $this->setExpectedException('PHPUnit_Framework_Error_Warning'); 148 Glob::doGlob(); // Not enough arguments 149 $this->setExpectedException('PHPUnit_Framework_Error_Warning'); 150 Glob::doGlob("*", GLOB_ERR, 2); // Too many arguments 303 304 private function expectOpenDir($dirname, $handle) { 305 $GLOBALS['opendir'][] = ['name' => $dirname, 'handle' => $handle]; 329function opendir($dirname) { 330 assert(isset($GLOBALS['opendir']), 'opendir called when not expected.'); 331form-display.functions.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 229 lines
1<?php 2function nzshpcrt_country_list($selected_country = null) { 98 99 $dir = @opendir(WPSC_FILE_DIR); 100 $num = 0; 153 } 154 $deletion_url = wp_nonce_url("admin.php?wpsc_admin_action=delete_file&file_id=".$file['file_id'], 'delete_file_'.absint($file['file_id'])); 155helper_dir.php https://gitlab.com/ilya.webcity/anna | PHP | 161 lines
1<?php 2 9 * @copyright 2010, 2011 KCFinder Project 10 * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2 11 * @license http://www.opensource.org/licenses/lgpl-2.1.php LGPLv2 16 17 /** Checks if the given directory is really writable. The standard PHP 18 * function is_writable() does not work properly on Windows servers 102 103 if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") 104 $dir = str_replace("\\", "/", $dir); 106 107 $dh = @opendir($dir); 108 if ($dh === false)ShipmentImportCommandController.php https://gitlab.com/uralgenc/bourdon-haenni.com | PHP | 184 lines
1<?php 2namespace Baumer\BaumerSerial\Command; 47 * 48 * ./typo3/cli_dispatch.phpsh extbase shipmentimport:import /your/absolute/directory/ 49 * 59 60 if (($handle = @opendir($directory)) === false) { 61 /** @var FlashMessage $flashMessage */zend_virtual_cwd.cpp https://gitlab.com/Blueprint-Marketing/hhvm | C++ | 209 lines
59{ 60 HPHP::String translated = HPHP::File::TranslatePath(HPHP::String(path, HPHP::CopyString)); 61 struct stat s; 74{ 75 HPHP::String translated = HPHP::File::TranslatePath(HPHP::String(path, HPHP::CopyString)); 76 if (translated.empty()) { 164 HPHP::String oldTrans = HPHP::File::TranslatePath(HPHP::String(oldname, HPHP::CopyString)); 165 HPHP::String newTrans = HPHP::File::TranslatePath(HPHP::String(newname, HPHP::CopyString)); 166 return rename(oldTrans.c_str(), newTrans.c_str()); 198{ 199 HPHP::String translated = HPHP::File::TranslatePath(HPHP::String(pathname, HPHP::CopyString)); 200 return rmdir(translated.c_str()); 205{ 206 HPHP::String translated = HPHP::File::TranslatePath(HPHP::String(pathname, HPHP::CopyString)); 207 return opendir(translated.c_str());form.php https://gitlab.com/florianocomercial/centreon | PHP | 265 lines
1<?php 2/* 34 */ 35require_once _CENTREON_PATH_ . "www/class/centreonGMT.class.php"; 36 81$form->addElement('select', 'maxViewMonitoring', _("Limit per page for Monitoring"), $limit); 82$form->addElement('text', 'maxGraphPerformances', _("Graph per page for Performances"), $attrsText2); 83 95$templates = array(); 96if ($handle = @opendir($oreon->optGen["oreon_path"]."www/Themes/")) { 97 while ($file = @readdir($handle)) { 249$helptext = ""; 250include_once("help.php"); 251foreach ($help as $key => $text) {functions.inc.php https://gitlab.com/gentotech/evotennissg | PHP | 263 lines
1<?php 2if ( ! defined( 'ABSPATH' ) ) 8 9 if (!($open = @opendir($directory))) 10 return FALSE;application.php https://gitlab.com/lankerd/paGO---Testing-Site | PHP | 475 lines
1<?php 2/** 225 // Give a warning if the cache-folder can not be opened 226 if ($data['caching'] > 0 && $data['cache_handler'] == 'file' && @opendir($path) == false) 227 { 300 // Set the configuration file path. 301 $file = JPATH_CONFIGURATION . '/configuration.php'; 302 310 { 311 $app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'), 'notice'); 312 } 313 314 // Attempt to write the configuration file as a PHP class named JConfig. 315 $configuration = $config->toString('PHP', array('class' => 'JConfig', 'closingtag' => false)); 324 { 325 $app->enqueueMessage(JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'), 'notice'); 326 }ItemCaseManager.php https://gitlab.com/Skull3x/WorkingInProgress-Plugins-Sourcecode-For-Dev | PHP | 273 lines
1<?php 2 84 85 $handler = opendir ( $path ); 86 while ( ($filename = readdir ( $handler )) !== false ) { 160 $output = "Item Cases:\n"; 161 $handler = opendir ( $xpath ); 162 $i = 1; 190 } 191 $handler = opendir ( $path ); 192 while ( ($filename = readdir ( $handler )) !== false ) {zend_virtual_cwd.h git://github.com/php/php-src.git | C Header | 383 lines
132# define php_sys_stat_ex php_win32_ioutil_stat_ex 133# define php_sys_stat php_win32_ioutil_stat 134# define php_sys_lstat php_win32_ioutil_lstat 135# define php_sys_fstat php_win32_ioutil_fstat 136# define php_sys_readlink php_win32_ioutil_readlink 137# define php_sys_symlink php_win32_ioutil_symlink 137# define php_sys_symlink php_win32_ioutil_symlink 138# define php_sys_link php_win32_ioutil_link 139#else 270#define VCWD_RMDIR(pathname) virtual_rmdir(pathname) 271#define VCWD_OPENDIR(pathname) virtual_opendir(pathname) 272#define VCWD_POPEN(command, type) virtual_popen(command, type) 319#define VCWD_LSTAT(path, buff) lstat(path, buff) 320#define VCWD_OPENDIR(pathname) opendir(pathname) 321#define VCWD_POPEN(command, type) popen(command, type)Filesystem.php https://gitlab.com/axeltizon/magentoV1.9-demopoweraccess | PHP | 363 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Filesystem.php 24593 2012-01-05 20:35:02Z matthew $ 21 */ 24/** Zend_Search_Lucene_Storage_Directory */ 25#require_once 'Zend/Search/Lucene/Storage/Directory.php'; 26 118 if (file_exists($path)) { 119 #require_once 'Zend/Search/Lucene/Exception.php'; 120 throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory'); 122 if (!self::mkdirs($path)) { 123 #require_once 'Zend/Search/Lucene/Exception.php'; 124 throw new Zend_Search_Lucene_Exception("Can't create directory '$path'."); 156 157 $dirContent = opendir( $this->_dirPath ); 158 while (($file = readdir($dirContent)) !== false) {Serializer.php https://gitlab.com/afzalpotenza/YII_salon | PHP | 291 lines
1<?php 2 98 $dir = $this->generateDirectoryPath($config); 99 $dh = opendir($dir); 100 while (false !== ($filename = readdir($dh))) { 120 $dir = $this->generateDirectoryPath($config); 121 $dh = opendir($dir); 122 while (false !== ($filename = readdir($dh))) { 269 } else { 270 // PHP's probably running as nobody, so we'll 271 // need to give global permissionspreferences.php https://gitlab.com/Conors99/ppm-1.8 | PHP | 191 lines
1<?php 2/** 16 17$page->add_breadcrumb_item($lang->preferences_and_personal_notes, "index.php?module=home-preferences"); 18 22{ 23 $page->add_breadcrumb_item($lang->recovery_codes, "index.php?module=home-preferences&action=recovery_codes"); 24 46{ 47 require_once MYBB_ROOT."inc/3rdparty/2fa/GoogleAuthenticator.php"; 48 $auth = new PHPGangsta_GoogleAuthenticator; 94 flash_message($lang->success_preferences_updated, 'success'); 95 admin_redirect("index.php?module=home-preferences"); 96 } 101 'title' => $lang->preferences_and_personal_notes, 102 'link' => "index.php?module=home-preferences", 103 'description' => $lang->prefs_and_personal_notes_descriptionDebugClassLoader.php https://gitlab.com/xolotsoft/pumasruiz | PHP | 222 lines
1<?php 2 54 if (!isset(self::$caseCheck)) { 55 self::$caseCheck = false !== stripos(PHP_OS, 'win') ? (false !== stripos(PHP_OS, 'darwin') ? 2 : 1) : 0; 56 } 75 { 76 // Ensures we don't hit https://bugs.php.net/42098 77 class_exists(__NAMESPACE__.'\ErrorHandler', true); 181 if (false !== strpos($class, '/')) { 182 throw new \RuntimeException(sprintf('Trying to autoload a class with an invalid name "%s". Be careful that the namespace separator is "\" in PHP, not "/".', $class)); 183 } 186 } 187 if (self::$caseCheck && preg_match('#([/\\\\][a-zA-Z_\x7F-\xFF][a-zA-Z0-9_\x7F-\xFF]*)+\.(php|hh)$#D', $file, $tail)) { 188 $tail = $tail[0]; 199 $real = getcwd().'/'; 200 $h = opendir('.'); 201 while (false !== $f = readdir($h)) {DirectoryIterator.php https://gitlab.com/iranjith4/hhvm | PHP | 163 lines
4/** 5 * ( excerpt from http://php.net/manual/en/class.directoryiterator.php ) 6 * 18 /** 19 * ( excerpt from http://php.net/manual/en/directoryiterator.construct.php 20 * ) 66 /** 67 * ( excerpt from http://php.net/manual/en/directoryiterator.next.php ) 68 * 123 /** 124 * ( excerpt from http://php.net/manual/en/directoryiterator.valid.php ) 125 * 136 /** 137 * ( excerpt from http://php.net/manual/en/directoryiterator.isdot.php ) 138 *mod_files.c https://gitlab.com/0072016/appengine-php | C | 464 lines
9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 171 if (data->fd != -1) { 172#ifndef PHP_WIN32 173 /* check to make sure that the opened file is not a symlink, linking to data outside of allowable dirs */ 193 if (fcntl(data->fd, F_SETFD, FD_CLOEXEC)) { 194 php_error_docref(NULL TSRMLS_CC, E_WARNING, "fcntl(%d, F_SETFD, FD_CLOEXEC) failed: %s (%d)", data->fd, strerror(errno), errno); 195 } 215 if (!dir) { 216 php_error_docref(NULL TSRMLS_CC, E_NOTICE, "ps_files_cleanup_dir: opendir(%s) failed: %s (%d)", dirname, strerror(errno), errno); 217 return (0);dropbox.php https://gitlab.com/wuhang2003/core | PHP | 352 lines
1<?php 2/** 35 36require_once __DIR__ . '/../../3rdparty/Dropbox/autoload.php'; 37 160 161 public function opendir($path) { 162 $contents = $this->getDropBoxMetaData($path, true);HttpCacheTestCase.php https://gitlab.com/Sigpot/AirSpot | PHP | 180 lines
1<?php 2 19 20class HttpCacheTestCase extends \PHPUnit_Framework_TestCase 21{ 163 164 $fp = opendir($directory); 165 while (false !== $file = readdir($fp)) {Jail.php https://gitlab.com/wuhang2003/core | PHP | 489 lines
62 /** 63 * see http://php.net/manual/en/function.mkdir.php 64 * 82 /** 83 * see http://php.net/manual/en/function.opendir.php 84 * 205 /** 206 * see http://php.net/manual/en/function.file_exists.php 207 * 235 /** 236 * see http://php.net/manual/en/function.file_put_contents.php 237 * 312 /** 313 * see http://php.net/manual/en/function.free_space.php 314 *ConfigurationTest.php https://gitlab.com/ptisky/API_prestashop | PHP | 248 lines
1<?php 2/** 9* It is also available through the world-wide-web at this URL: 10* http://opensource.org/licenses/osl-3.0.php 11* If you did not receive a copy of the license and are unable to 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 44 // Misc functions 45 static function test_phpversion() 46 { 46 { 47 return version_compare(substr(phpversion(), 0, 3), '5.0', '>='); 48 } 102 $dir = rtrim(_PS_ROOT_DIR_, '\\/').DIRECTORY_SEPARATOR.trim($relative_dir, '\\/'); 103 if (!file_exists($dir) || !$dh = opendir($dir)) 104 {file_helper.php https://gitlab.com/RikaPM/manik | PHP | 480 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.1.6 or newer 6 * 126 127 if ( ! $current_dir = @opendir($path)) 128 { 180 181 if ($fp = @opendir($source_dir)) 182 { 232 233 if ($fp = @opendir($source_dir)) 234 { 335 * 336 * Translates a file extension into a mime type based on config/mimes.php. 337 * Returns FALSE if it can't determine the type, or open the mime config filefns_tinybrowser.php https://gitlab.com/ilya.webcity/anna | PHP | 431 lines
17 { 18 ?><div class="alert<?php echo $notify['type'][$i]; ?>"><?php echo $notify['message'][$i]; ?></div><br /><?php 19 } 163function form_open($name,$class,$url,$parameters){ 164?><form name="<?php echo $name; ?>" class="<?php echo $class; ?>" method="post" action="<?php echo $url.$parameters; ?>"> 165<?php 169function form_select($options,$name,$label,$current,$auto){ 170if ($label) {?><label for="<?php echo $name; ?>"><?php echo $label; ?></label><?php } 171?><select name="<?php echo $name; ?>" <?php if ($auto) {?>onchange="this.form.submit();"<?php }?>> 190if ($label) {?><label for="<?php echo $name; ?>"><?php echo $label; ?></label><?php } ?> 191<input type="text" name="<?php echo $name; ?>" size="<?php echo $size; ?>" maxlength="<?php echo $maxlength; ?>" value="<?php echo $value; ?>" /><?php 192} 195function form_submit_button($name,$label,$class) { 196?><button <?php if ($class) {?>class="<?php echo $class; ?>"<?php } ?>type="submit" name="<?php echo $name; ?>"><?php echo $label; ?></button> 197</form>var_dump.php https://gitlab.com/iranjith4/hhvm | PHP | 284 lines
1<?php 2/* Prototype: void var_dump ( mixed $expression [, mixed $expression [, $...]] ); 88 '\t', 89 "PHP", 90 'PHP', 222/* directory type resource */ 223$dir_handle = opendir( dirname(__FILE__) ); 224Stream.php https://gitlab.com/luisrepo/ClienteWS | PHP | 565 lines
1<?php 2/** 19 * @license http://todo name_todo 20 * @version $Id: Stream.php 23775 2011-03-01 17:25:24Z ralph $ 21 */ 25 */ 26require_once 'Zend/Service/WindowsAzure/Storage/Blob.php'; 27 30 */ 31require_once 'Zend/Service/WindowsAzure/Exception.php'; 32 520 */ 521 public function dir_opendir($path, $options) 522 {Model.php https://gitlab.com/x33n/ImpressPages | PHP | 323 lines
1<?php 2/** 15 const INSTALL_DIR = 'setup/'; 16 const PARAMETERS_FILE = 'parameters.php'; 17 120 $answer = array(); 121 if ($handle = opendir($folder)) { 122 while (false !== ($file = readdir($handle))) { 302 * files starting with underscore (for example, _layout.php) are considered hidden. 303 * @return array layouts (e.g. ['main.php', 'home.php']) 304 * @throws \Ip\Exception 312 foreach ($files as $filename) { 313 if ('php' == strtolower(pathinfo($filename, PATHINFO_EXTENSION))) { 314 if ($filename[0] != '_') {helper.php https://gitlab.com/wuhang2003/core | PHP | 129 lines
1<?php 2/** 53 54 $dirContent = $view->opendir($dir); 55 if ($dirContent === false) {rotate.php https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests | PHP | 206 lines
1<?php 2 9 10 http://www.hiveware.com/imagerotator.php 11 26 ABOUT 27 This PHP script will randomly select an image file from a 28 folder of images on your webserver. You can then link to it 50 - More error checking 51 - Cleaner code (albeit more PHP-specific) 52 - Better/faster random number generation and file-type parsing 55 images being found in the specified folder) *and* you're 56 lucky enough to have the GD libraries compiled into PHP on 57 your webserver, we generate a replacement "error image" on 75 2. Add image types if needed (most users can ignore that part). 76 3. Upload this file (rotate.php) to your webserver. I recommend 77 uploading it to the same folder as your images.CLocale.php https://gitlab.com/Griffolion/Final-Year-Project | PHP | 472 lines
1<?php 2/** 76 $dataPath=self::$dataPath===null ? dirname(__FILE__).DIRECTORY_SEPARATOR.'data' : self::$dataPath; 77 $folder=@opendir($dataPath); 78 while(($file=@readdir($folder))!==false) 80 $fullPath=$dataPath.DIRECTORY_SEPARATOR.$file; 81 if(substr($file,-4)==='.php' && is_file($fullPath)) 82 $locales[]=substr($file,0,-4); 100 $dataPath=self::$dataPath===null ? dirname(__FILE__).DIRECTORY_SEPARATOR.'data' : self::$dataPath; 101 $dataFile=$dataPath.DIRECTORY_SEPARATOR.$this->_id.'.php'; 102 if(is_file($dataFile))Session_files_driver.php https://gitlab.com/rezaul007/Hospital-information-bank | PHP | 362 lines
1<?php 2/** 4 * 5 * An open source application development framework for PHP 6 * 123 { 124 throw new Exception("Session: Configured save path '".$this->_config['save_path']."' is not writable by the PHP process."); 125 } 146 { 147 // This might seem weird, but PHP 5.6 introduces session_reset(), 148 // which re-reads session data 151 // Just using fopen() with 'c+b' mode would be perfect, but it is only 152 // available since PHP 5.2.6 and we have to set permissions for new files, 153 // so we'd have to hack around this ... 328 { 329 if ( ! is_dir($this->_config['save_path']) OR ($directory = opendir($this->_config['save_path'])) === FALSE) 330 {superfish-widget.php https://gitlab.com/Gashler/sg | PHP | 271 lines
60 <?php if('on' == $home){ ?> 61 <li class="page_item cat-item blogtab <?php if ( is_front_page() && !is_paged() ){ ?>current_page_item current-cat<?php } ?>"><a href="<?php echo get_option('home'); ?>/"><span><?php _e('Home', 'shailan-sf-dropdown'); ?></span></a></li> 62 <?php } ?> 118 119 <p><?php _e('Type:'); ?> <label for="Pages"><input type="radio" id="Pages" name="<?php echo $this->get_field_name('type'); ?>" value="Pages" <?php if($type=='Pages'){ echo 'checked="checked"'; } ?> /> <?php _e('Pages', 'shailan-sf-dropdown'); ?></label> <label for="Categories"><input type="radio" id="Categories" name="<?php echo $this->get_field_name('type'); ?>" value="Categories" <?php if($type=='Categories'){ echo 'checked="checked"'; } ?>/> <?php _e('Categories', 'shailan-sf-dropdown'); ?></label></p> 120 129 130 <p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:', 'shailan-sf-dropdown'); ?> <input class="widefat" id="<?php echo $this->get_field_id('exclude'); ?>" name="<?php echo $this->get_field_name('exclude'); ?>" type="text" value="<?php echo $exclude; ?>" /></label><br /> 131 <small>Page IDs, separated by commas.</small></p> 170 171 <p><label for="<?php echo $this->get_field_id('min_width'); ?>"><?php _e('Minimum Width:', 'shailan-sf-dropdown'); ?> <input id="<?php echo $this->get_field_id('min_width'); ?>" name="<?php echo $this->get_field_name('min_width'); ?>" type="text" value="<?php echo $min_width; ?>" size="6" />em</label><br /> 172 <small>Minimum width of sub menus.</small></p> 173 174 <p><label for="<?php echo $this->get_field_id('max_width'); ?>"><?php _e('Maximum width:', 'shailan-sf-dropdown'); ?> <input id="<?php echo $this->get_field_id('max_width'); ?>" name="<?php echo $this->get_field_name('max_width'); ?>" type="text" value="<?php echo $max_width; ?>" size="6" />em</label><br /> 175 <small>Maximum width of sub menus.</small></p>tsrm_virtual_cwd.h https://gitlab.com/iranjith4/hhvm | C Header | 332 lines
127CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); 128# define php_sys_stat(path, buf) php_sys_stat_ex(path, buf, 0) 129# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) 129# define php_sys_lstat(path, buf) php_sys_stat_ex(path, buf, 1) 130CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len); 131#else 131#else 132# define php_sys_stat stat 133# define php_sys_lstat lstat 267#define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC) 268#define VCWD_OPENDIR(pathname) virtual_opendir(pathname TSRMLS_CC) 269#define VCWD_POPEN(command, type) virtual_popen(command, type TSRMLS_CC) 303#define VCWD_RMDIR(pathname) rmdir(pathname) 304#define VCWD_OPENDIR(pathname) opendir(pathname) 305#define VCWD_POPEN(command, type) popen(command, type)ap_download.class.php https://gitlab.com/michield/dokuwiki | PHP | 288 lines
1<?php 2class ap_download extends ap_manage { 144 function find_folders(&$result,$base,$dir=''){ 145 $dh = @opendir("$base/$dir"); 146 if(!$dh) return false; 262 if (is_dir($src)) { 263 if (!$dh = @opendir($src)) return false; 264FileSystem2.php https://gitlab.com/x33n/ImpressPages | PHP | 235 lines
1<?php 2/** 7 8namespace PhpUnit\Helper; 9 64 } 65 $oldErrorHandler = set_error_handler(array('PhpUnit\Helper\FileSystem2', 'handleError')); 66 82 $path = $this->removeTrailingSlash($path); 83 if ($handle = opendir($path)) { 84 while (false !== ($file = readdir($handle))) { 96 97 $oldErrorHandler = set_error_handler(array('PhpUnit\Helper\FileSystem2', 'handleError')); 98 try { 130 if (is_dir($dir)) { 131 if ($handle = opendir($dir)) { 132 while (false !== ($file = readdir($handle))) {MaildirFolderTest.php http://firephp.googlecode.com/svn/trunk/ | PHP | 0 lines
12 */ 13require_once 'Zend/Mail/Storage/Folder/Maildir.php'; 14 17 */ 18require_once 'Zend/Config.php'; 19 20/** 21 * PHPUnit test case 22 */ 22 */ 23require_once 'PHPUnit/Framework/TestCase.php'; 24 57 $count = 0; 58 $dh = opendir($this->_tmpdir); 59 while (readdir($dh) !== false) {accounts.php https://gitlab.com/billyprice1/ruTorrent | PHP | 279 lines
1<?php 2 2 3require_once( dirname(__FILE__)."/../../php/util.php" ); 4require_once( $rootPath.'/php/cache.php'); 4require_once( $rootPath.'/php/cache.php'); 5require_once( $rootPath.'/php/Snoopy.class.inc'); 6eval( getPluginConf( 'loginmgr' ) ); 148 $this->accounts = array(); 149 if( $handle = opendir($dir) ) 150 { 154 { 155 $name = basename($file,".php"); 156 $this->accounts[$name] = array( "name"=>$name, "path"=>fullpath($dir.'/'.$file), "object"=>$name."Account", "login"=>'', "password"=>'', "enabled"=>0, "auto"=>0 ); 260 rTorrentSettings::get()->getScheduleCommand("loginmgr",1440, 261 getCmd('execute').'={sh,-c,'.escapeshellarg(getPHP()).' '.escapeshellarg(dirname(__FILE__).'/update.php').' '.escapeshellarg(getUser()).' & exit 0}' ) : 262 rTorrentSettings::get()->getRemoveScheduleCommand("loginmgr") );formModule.php https://gitlab.com/florianocomercial/centreon | PHP | 224 lines
64 $flag = false; 65 include_once(_CENTREON_PATH_ . "www/modules/".$name."/conf.php"); 66 $tpl->assign("module_rname", $module_conf[$name]["rname"]); 99 $php_file = "install.php"; 100 $php_file_path = _CENTREON_PATH_ . "www/modules/".$name."/php/".$php_file; 101 if ($module_conf[$name]["php_files"] && file_exists($php_file_path)) { 101 if ($module_conf[$name]["php_files"] && file_exists($php_file_path)) { 102 $tpl->assign("output3", _("PHP file included")); 103 include_once($php_file_path); 140 if (substr($filename, 0, 1) != "." && strstr($filename, $moduleinfo["name"]."-")) { 141 include_once(_CENTREON_PATH_ . "www/modules/".$moduleinfo["name"]."/UPGRADE/".$filename."/conf.php"); 142 if ($moduleinfo["mod_release"] == $upgrade_conf[$moduleinfo["name"]]["release_from"]) { 159 $php_file = "upgrade.php"; 160 $php_file_path = _CENTREON_PATH_ . "www/modules/".$moduleinfo["name"]."/UPGRADE/".$filename."/php/".$php_file; 161 if ($upgrade_conf[$moduleinfo["name"]]["php_files"] && file_exists($php_file_path)) {CreateZipFile.inc.php https://gitlab.com/klausmig/CloudSemanticWeb | PHP | 220 lines
1<?php 2/** 181 $fileArray=array(); 182 $handle = opendir($rootPath); 183 while( ($file = @readdir($handle))!==false) {icalert_msg.php https://gitlab.com/Alzakath/icagenda | PHP | 192 lines
1<?php 2/** 43 // Set Function to condition to be checked 44 $events_php=$this->getList($url); 45 $cal_date=$this->getCalDate($url); 48 { 49 $list = $events_php; 50 $doc_url = 'http://www.icagenda.com/theme-pack-upgrade/3-2-8-new-option-all-dates'; 85 $html[] = '<p>'; 86 $html[] = '<b><i>'.JText::_( 'COM_ICAGENDA_EVENTS_PHPFILE_MISSING_PACKS_LIST' ).'</i></b><br />'; 87 $html[] = $setlist; 112 /** 113 * Function to check if the file 'THEME_events.php' exists in each Theme Pack 114 */ 120 { 121 $handle = opendir($dirname); 122helper_dir.php https://gitlab.com/ptisky/API_prestashop | PHP | 179 lines
1<?php 2/** 39 40/** Checks if the given directory is really writable. The standard PHP 41 * function is_writable() does not work properly on Windows servers 125 126 if (strtoupper(substr(PHP_OS, 0, 3)) == "WIN") 127 $dir = str_replace("\\", "/", $dir); 129 130 $dh = @opendir($dir); 131 if ($dh === false)FailedStorage.php https://gitlab.com/wuhang2003/core | PHP | 215 lines
1<?php 2/** 59 60 public function opendir($path) { 61 throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);php_fopen_wrapper.c git://github.com/vpj/PHP-Extension-API.git | C | 351 lines
39 40static size_t php_stream_output_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) 41{ 149 150php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) 151{ 201 } 202 return php_stream_alloc(&php_stream_input_ops, ecalloc(1, sizeof(off_t)), 0, "rb"); 203 } 278 } else { 279 php_stream_apply_filter_list(stream, p, mode_rw & PHP_STREAM_FILTER_READ, mode_rw & PHP_STREAM_FILTER_WRITE TSRMLS_CC); 280 } 336 337php_stream_wrapper php_stream_php_wrapper = { 338 &php_stdio_wops,Maildir.php https://gitlab.com/jalon/doadoronline | PHP | 408 lines
1<?php 2/** 263 ErrorHandler::start(E_WARNING); 264 $dh = opendir($dirname . '/cur/'); 265 $error = ErrorHandler::stop(); 272 ErrorHandler::start(E_WARNING); 273 $dh = opendir($dirname . '/new/'); 274 $error = ErrorHandler::stop();upload.php https://gitlab.com/dkiller1/rapidleech | PHP | 220 lines
1<?php 2 2 3require_once('rl_init.php'); 4ignore_user_abort(true); 7 8include(CLASS_DIR.'http.php'); 9 18// We want to check if the selected upload service is a valid ones 19$d = opendir ( HOST_DIR . "upload/" ); 20while ( false !== ($modules = readdir ( $d )) ) { 22 if (is_file ( HOST_DIR . "upload/" . $modules )) { 23 if (strpos ( $modules, ".index.php" )) 24 include_once (HOST_DIR . "upload/" . $modules); 203if (isset($_GET['auul'])) { 204?><script type="text/javascript">parent.nextlink<?php echo $_GET['auul']; ?>();</script><?php 205 // Write links to a filecount_recursive.php https://gitlab.com/iranjith4/hhvm | PHP | 126 lines
1<?php 2/* Prototype: int count ( mixed $var [, int $mode] ); 93$resource1 = fopen( __FILE__, "r" ); // Creating file(stream type) resource 94$resource2 = opendir( "." ); // Creating dir resource 95file.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 403 lines
1<?php 2 81function w3_rmdir($path, $exclude = array(), $remove = true) { 82 $dir = @opendir($path); 83 336/** 337 * Takes a W3TC settings array and formats it to a PHP String 338 * @param $data 341function w3tc_format_data_as_settings_file($data) { 342 $config = "<?php\r\n\r\nreturn array(\r\n"; 343 foreach ($data as $key => $value)ThemeManager.php git://github.com/phpmyadmin/phpmyadmin.git | PHP | 307 lines
1<?php 2 4 5namespace PhpMyAdmin; 6 12use function ksort; 13use function opendir; 14use function readdir; 22/** 23 * phpMyAdmin theme manager 24 */ 219 // force a change of a dummy session variable to avoid problems 220 // with the caching of phpmyadmin.css.php 221 $GLOBALS['config']->set('theme-update', $themeId); 228 $this->themes = []; 229 $dirHandle = opendir($this->themesPath); 230SkyWarsConfiguration.php https://gitlab.com/Skull3x/WorkingInProgress-Plugins-Sourcecode-For-Dev | PHP | 239 lines
1<?php 2 121 122 $handler = opendir ( $path ); 123 while ( ($filename = readdir ( $handler )) !== false ) { 184 185 $handler = opendir ( $path ); 186 while ( ($filename = readdir ( $handler )) !== false ) {Maildir.php https://gitlab.com/jalon/doadoronline | PHP | 211 lines
1<?php 2/** 85 ErrorHandler::start(E_WARNING); 86 $dh = opendir($this->rootdir); 87 $error = ErrorHandler::stop();Maildir.php https://gitlab.com/fabiorf/curso-zend1-aula1 | PHP | 265 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Maildir.php 24593 2012-01-05 20:35:02Z matthew $ 21 */ 26 */ 27require_once 'Zend/Mail/Storage/Folder.php'; 28 31 */ 32require_once 'Zend/Mail/Storage/Folder/Interface.php'; 33 36 */ 37require_once 'Zend/Mail/Storage/Maildir.php'; 38 92 */ 93 require_once 'Zend/Mail/Storage/Exception.php'; 94 throw new Zend_Mail_Storage_Exception('no valid dirname given in params');captcha_helper.php https://gitlab.com/sittipongwork/impro_dashboard | PHP | 336 lines
1<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 2/** 4 * 5 * An open source application development framework for PHP 5.1.6 or newer 6 * 88 89 $current_dir = @opendir($img_path); 90 120 121 // PHP7 or a suitable polyfill 122 if (function_exists('random_int')) 210 211 // PHP.net recommends imagecreatetruecolor(), but it isn't always available 212 if (function_exists('imagecreatetruecolor')) 334 335/* End of file captcha_helper.php */ 336/* Location: ./system/heleprs/captcha_helper.php */util_rt.php https://gitlab.com/billyprice1/ruTorrent | PHP | 439 lines
1<?php 2 2 3require_once( "../../php/xmlrpc.php" ); 4require_once( "../../php/Torrent.php" ); 33//------------------------------------------------------------------------------ 34function rtDaemon( $php, $script, $args ) 35{ 35{ 36 if( !$php || $php == '' ) $php = 'php'; 37 $params = escapeshellarg( $script ).' --daemon'; 39 $params .= ' '.escapeshellarg( $arg ); 40 exec( $php.' '.$params.' > /dev/null 2>/dev/null &', $out, $ret ); 41 exit( (int)$ret ); 146 { 147 // recursive mkdir() only after PHP_5.0 148 mkdir( $dir, $mode, true );dir.c https://github.com/php/php-src.git | C | 581 lines
79 } \ 80 if ((dirp = (php_stream *)zend_fetch_resource(DIRG(default_dir), "Directory", php_file_le_stream())) == NULL) { \ 81 RETURN_THROWS(); \ 90 } \ 91 if ((dirp = (php_stream *)zend_fetch_resource_ex(handle_zv, "Directory", php_file_le_stream())) == NULL) { \ 92 RETURN_THROWS(); \ 196/* {{{ internal functions */ 197static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject) 198{ 212 213 dirp = php_stream_opendir(dirname, REPORT_ERRORS, context); 214 234/* {{{ Open a directory and return a dir_handle */ 235PHP_FUNCTION(opendir) 236{Maildir.php https://gitlab.com/luisrepo/ClienteWS | PHP | 265 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Maildir.php 23775 2011-03-01 17:25:24Z ralph $ 21 */ 26 */ 27require_once 'Zend/Mail/Storage/Folder.php'; 28 31 */ 32require_once 'Zend/Mail/Storage/Folder/Interface.php'; 33 36 */ 37require_once 'Zend/Mail/Storage/Maildir.php'; 38 92 */ 93 require_once 'Zend/Mail/Storage/Exception.php'; 94 throw new Zend_Mail_Storage_Exception('no valid dirname given in params');MaildirTest.php git://github.com/zendframework/zf2.git | PHP | 445 lines
1<?php 2/** 36 */ 37class MaildirTest extends \PHPUnit_Framework_TestCase 38{ 61 $count = 0; 62 $dh = opendir($this->_tmpdir); 63 while (readdir($dh) !== false) { 76 mkdir($this->_tmpdir . $dir); 77 $dh = opendir($this->_originalMaildir . $dir); 78 while (($entry = readdir($dh)) !== false) { 91 foreach (array('cur', 'new') as $dir) { 92 $dh = opendir($this->_tmpdir . $dir); 93 while (($entry = readdir($dh)) !== false) {MaildirFolderTest.php git://github.com/zendframework/zf2.git | PHP | 0 lines
1<?php 2/** 36 */ 37class MaildirFolderTest extends \PHPUnit_Framework_TestCase 38{ 63 $count = 0; 64 $dh = opendir($this->_tmpdir); 65 while (readdir($dh) !== false) { 86 mkdir($this->_tmpdir . $dir . '/' . $subdir); 87 $dh = opendir($this->_originalDir . $dir . '/' . $subdir); 88 while (($entry = readdir($dh)) !== false) { 106 } 107 $dh = opendir($this->_tmpdir . $dir . '/' . $subdir); 108 while (($entry = readdir($dh)) !== false) { 203 try { 204 // explicit call of __toString() needed for PHP < 5.2 205 $this->assertEquals($mail->getFolders()->subfolder->__toString(), 'subfolder');resourcebundle_class.c https://gitlab.com/envieidoc/tomato | C | 455 lines
2 +----------------------------------------------------------------------+ 3 | PHP Version 5 | 4 +----------------------------------------------------------------------+ 4 +----------------------------------------------------------------------+ 5 | This source file is subject to version 3.01 of the PHP license, | 6 | that is bundled with this package in the file LICENSE, and is | 7 | available through the world-wide-web at the following url: | 8 | http://www.php.net/license/3_01.txt | 9 | If you did not receive a copy of the PHP license and are unable to | 10 | obtain it through the world-wide-web, please send a note to | 11 | license@php.net so we can mail you a copy immediately. | 12 +----------------------------------------------------------------------+ 23#include <Zend/zend_interfaces.h> 24#include <php.h> 25admin.media.php http://miacms.googlecode.com/svn/trunk/ | PHP | 360 lines
1<?php 2/** 4* @subpackage Media Manager 5* @author MiaCMS see README.php 6* @copyright see README.php 6* @copyright see README.php 7* See COPYRIGHT.php for copyright notices and details. 8* @license GNU/GPL Version 2, see LICENSE.php 19 | $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_media' ))) { 20 mosRedirect( 'index2.php', T_('You are not authorized to view this resource.') ); 21} 38if (is_int(strpos ($listdir, "..")) && $listdir<>'') { 39 mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], T_("NO HACKING PLEASE") ); 40 } 50 if (ini_get('safe_mode')=="On") { 51 mosRedirect( "index2.php?option=com_media&listdir=".$_POST['dirPath'], T_("Directory creation not allowed while running in SAFE MODE as this can cause problems.") ); 52 }CFileHelperTest.php https://gitlab.com/RECITEC/yii | PHP | 196 lines
1<?php 2class CFileHelperTest extends CTestCase 21 $filesData=array( 22 'mimeTypes1.php'=>"<?php return array('txa'=>'application/json','txb'=>'another/mime');", 23 'mimeTypes2.php'=>"<?php return array('txt'=>'text/plain','txb'=>'another/mime2');", 45 46 $this->assertEquals('application/json',CFileHelper::getMimeTypeByExtension('test.txa',$this->testDir.'mimeTypes1.php')); 47 $this->assertEquals('another/mime',CFileHelper::getMimeTypeByExtension('test.txb',$this->testDir.'mimeTypes1.php')); 47 $this->assertEquals('another/mime',CFileHelper::getMimeTypeByExtension('test.txb',$this->testDir.'mimeTypes1.php')); 48 $this->assertNull(CFileHelper::getMimeTypeByExtension('test.txt',$this->testDir.'mimeTypes1.php')); 49 49 50 $this->assertNull(CFileHelper::getMimeTypeByExtension('test.txa',$this->testDir.'mimeTypes2.php')); 51 $this->assertEquals('another/mime2',CFileHelper::getMimeTypeByExtension('test.txb',$this->testDir.'mimeTypes2.php')); 51 $this->assertEquals('another/mime2',CFileHelper::getMimeTypeByExtension('test.txb',$this->testDir.'mimeTypes2.php')); 52 $this->assertEquals('text/plain',CFileHelper::getMimeTypeByExtension('test.txt',$this->testDir.'mimeTypes2.php')); 53 }Mbox.php https://gitlab.com/devtoannh/cafe | PHP | 264 lines
1<?php 2/** 19 * @license http://framework.zend.com/license/new-bsd New BSD License 20 * @version $Id: Mbox.php 23775 2011-03-01 17:25:24Z ralph $ 21 */ 26 */ 27require_once 'Zend/Mail/Storage/Folder.php'; 28 31 */ 32require_once 'Zend/Mail/Storage/Folder/Interface.php'; 33 36 */ 37require_once 'Zend/Mail/Storage/Mbox.php'; 38 88 */ 89 require_once 'Zend/Mail/Storage/Exception.php'; 90 throw new Zend_Mail_Storage_Exception('use Zend_Mail_Storage_Mbox for a single file');