• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP php_ini_loaded_file函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中php_ini_loaded_file函数的典型用法代码示例。如果您正苦于以下问题:PHP php_ini_loaded_file函数的具体用法?PHP php_ini_loaded_file怎么用?PHP php_ini_loaded_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了php_ini_loaded_file函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: extract

 protected function extract($file, $path)
 {
     $processError = null;
     // try to use unzip on *nix
     if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
         $command = 'unzip ' . escapeshellarg($file) . ' -d ' . escapeshellarg($path);
         if (0 === $this->process->execute($command, $ignoredOutput)) {
             return;
         }
         $processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput();
     }
     if (!class_exists('ZipArchive')) {
         // php.ini path is added to the error message to help users find the correct file
         $iniPath = php_ini_loaded_file();
         if ($iniPath) {
             $iniMessage = 'The php.ini used by your command-line PHP is: ' . $iniPath;
         } else {
             $iniMessage = 'A php.ini file does not exist. You will have to create one.';
         }
         $error = "Could not decompress the archive, enable the PHP zip extension or install unzip.\n" . $iniMessage . "\n" . $processError;
         if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
             $error = "Could not decompress the archive, enable the PHP zip extension.\n" . $iniMessage;
         }
         throw new \RuntimeException($error);
     }
     $zipArchive = new ZipArchive();
     if (true !== ($retval = $zipArchive->open($file))) {
         throw new \UnexpectedValueException($this->getErrorMessage($retval, $file));
     }
     if (true !== $zipArchive->extractTo($path)) {
         throw new \RuntimeException("There was an error extracting the ZIP file. Corrupt file?");
     }
     $zipArchive->close();
 }
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:34,代码来源:ZipDownloader.php


示例2: newsletter_start_commandline_sending

/**
 * Start the commandline to send a newsletter
 * This is offloaded because it could take a while and/or resources
 *
 * @param Newsletter $entity Newsletter entity to be processed
 *
 * @return void
 */
function newsletter_start_commandline_sending(Newsletter $entity)
{
    if (!empty($entity) && elgg_instanceof($entity, "object", Newsletter::SUBTYPE)) {
        // prepare commandline settings
        $settings = array("entity_guid" => $entity->getGUID(), "host" => $_SERVER["HTTP_HOST"], "memory_limit" => ini_get("memory_limit"), "secret" => newsletter_generate_commanline_secret($entity->getGUID()));
        if (isset($_SERVER["HTTPS"])) {
            $settings["https"] = $_SERVER["HTTPS"];
        }
        // ini settings
        $ini_param = "";
        $ini_file = php_ini_loaded_file();
        if (!empty($ini_file)) {
            $ini_param = "-c " . $ini_file . " ";
        }
        // which script to run
        $script_location = dirname(dirname(__FILE__)) . "/procedures/cli.php";
        // convert settings to commandline params
        $query_string = http_build_query($settings, "", " ");
        // start the correct commandline
        if (PHP_OS === "WINNT") {
            pclose(popen("start /B php " . $ini_param . $script_location . " " . $query_string, "r"));
        } else {
            exec("php " . $ini_param . $script_location . " " . $query_string . " > /dev/null &");
        }
    }
}
开发者ID:pleio,项目名称:newsletter,代码行数:34,代码来源:functions.php


示例3: execute

 /**
  * Execute the "show" command
  *
  * @param  InputInterface $input Input object
  * @param  OutputInterface $output Output object
  * @throws \Exception
  * @return null
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $path = $input->getOption('path');
     // if we're not given a path at all, try to figure it out
     if ($path === null) {
         $path = php_ini_loaded_file();
     }
     if (!is_file($path)) {
         throw new \Exception('Path is null or not accessible: "' . $path . '"');
     }
     $ini = parse_ini_file($path, true);
     $output->writeLn('Current PHP.ini settings from ' . $path);
     $output->writeLn('##########');
     foreach ($ini as $section => $data) {
         $output->writeLn('<info>:: ' . $section . '</info>');
         if (empty($data)) {
             $output->writeLn("\t<fg=yellow>No settings</fg=yellow>");
         } else {
             foreach ($data as $path => $value) {
                 $output->writeLn("\t" . $path . ' => ' . var_export($value, true));
             }
         }
         $output->writeLn("-----------------\n");
     }
 }
开发者ID:giuseppemorelli,项目名称:iniscan,代码行数:33,代码来源:ShowCommand.php


示例4: newsletter_start_commandline_sending

/**
 * Start the commandline to send a newsletter
 * This is offloaded because it could take a while and/or resources
 *
 * @param Newsletter $entity Newsletter entity to be processed
 *
 * @return void
 */
function newsletter_start_commandline_sending(Newsletter $entity)
{
    if (!elgg_instanceof($entity, 'object', Newsletter::SUBTYPE)) {
        return;
    }
    // prepare commandline settings
    $settings = ['entity_guid' => $entity->getGUID(), 'host' => $_SERVER['HTTP_HOST'], 'memory_limit' => ini_get('memory_limit'), 'secret' => newsletter_generate_commanline_secret($entity->getGUID())];
    if (isset($_SERVER['HTTPS'])) {
        $settings['https'] = $_SERVER['HTTPS'];
    }
    // ini settings
    $ini_param = '';
    $ini_file = php_ini_loaded_file();
    if (!empty($ini_file)) {
        $ini_param = "-c {$ini_file} ";
    }
    // which script to run
    $script_location = dirname(dirname(__FILE__)) . '/procedures/cli.php';
    // convert settings to commandline params
    $query_string = http_build_query($settings, '', ' ');
    // start the correct commandline
    if (PHP_OS === 'WINNT') {
        pclose(popen('start /B php ' . $ini_param . $script_location . ' ' . $query_string, 'r'));
    } else {
        exec('php ' . $ini_param . $script_location . ' ' . $query_string . ' > /dev/null &');
    }
}
开发者ID:coldtrick,项目名称:newsletter,代码行数:35,代码来源:functions.php


示例5: install

 /**
  * Install extension by given name.
  *
  * Uses configration retrieved as per `php_ini_loaded_file()`.
  *
  * @see http://php.net/php_ini_loaded_file
  * @param string $name The name of the extension to install.
  * @return void
  */
 public static function install($name)
 {
     if (!isset(static::$_extensions[$name])) {
         return;
     }
     $extension = static::$_extensions[$name];
     echo $name;
     if (isset($extension['require']['php'])) {
         $version = $extension['require']['php'];
         if (!version_compare(PHP_VERSION, $version[1], $version[0])) {
             $message = " => not installed, requires a PHP version %s %s (%s installed)\n";
             printf($message, $version[0], $version[1], PHP_VERSION);
             return;
         }
     }
     static::_system(sprintf('wget %s > /dev/null 2>&1', $extension['url']));
     $file = basename($extension['url']);
     static::_system(sprintf('tar -xzf %s > /dev/null 2>&1', $file));
     $folder = basename($file, '.tgz');
     $folder = basename($folder, '.tar.gz');
     $message = 'sh -c "cd %s && phpize && ./configure %s ';
     $message .= '&& make && sudo make install" > /dev/null 2>&1';
     static::_system(sprintf($message, $folder, implode(' ', $extension['configure'])));
     foreach ($extension['ini'] as $ini) {
         static::_system(sprintf("echo %s >> %s", $ini, php_ini_loaded_file()));
     }
     printf("=> installed (%s)\n", $folder);
 }
开发者ID:bruensicke,项目名称:li3_redis,代码行数:37,代码来源:ci_depends.php


示例6: __construct

 public function __construct()
 {
     parent::__construct();
     //
     // Make sure that bool valued settings are cast to ints.
     //
     $this->_settings = array(self::ALLOW_USER_REGISTRATION => 1, self::EXECUTABLE_TAR => Framework_HostOs::isWindows() ? '' : 'tar', self::EXECUTABLE_GIT => 'git' . (Framework_HostOs::isWindows() ? '.exe' : ''), self::EXECUTABLE_PHP => 'php' . (Framework_HostOs::isWindows() ? '.exe' : '') . (php_ini_loaded_file() ? ' -c ' . htmlentities(str_replace(array('\\', '//'), '/', php_ini_loaded_file())) : ''), self::EXECUTABLE_SVN => 'svn' . (Framework_HostOs::isWindows() ? '.exe' : ''), self::INTERNAL_BUILDER_ACTIVE => CINTIENT_INTERNAL_BUILDER_ACTIVE, self::VERSION => '');
 }
开发者ID:rasismeiro,项目名称:cintient,代码行数:8,代码来源:SystemSettings.php


示例7: getIniPath

 public function getIniPath()
 {
     $ini = php_ini_loaded_file();
     if (!$ini && file_exists('/etc/hhvm/php.ini')) {
         $ini = '/etc/hhvm/php.ini';
     }
     return $ini;
 }
开发者ID:staabm,项目名称:pickle,代码行数:8,代码来源:HHVM.php


示例8: iniCheck

 public function iniCheck($info, $setting, $expected, $required = true, $help = null)
 {
     $current = ini_get($setting);
     $cb = function () use($current, $expected) {
         return is_callable($expected) ? call_user_func($expected, $current) : $current == $expected;
     };
     $message = sprintf('%s in %s is currently set to %s but %s be set to %s.', $setting, php_ini_loaded_file(), var_export($current, true), $required ? 'must' : 'should', var_export($expected, true)) . ' ' . $help;
     $this->check($info, $cb, trim($message), $required);
 }
开发者ID:myrichhub,项目名称:mssapi_php,代码行数:9,代码来源:compatibility-test.php


示例9: setDirective

 /**
  * @param string $section
  */
 public static function setDirective($section, $directive, $value)
 {
     $ini_file = php_ini_loaded_file();
     self::doBackup($ini_file);
     $ini = new INIReaderWriter($ini_file);
     $ini->set($section, $directive, $value);
     $ini->write($ini_file);
     return true;
 }
开发者ID:siltronicz,项目名称:webinterface,代码行数:12,代码来源:PHPINI.php


示例10: execute

 public function execute()
 {
     $file = php_ini_loaded_file();
     if (!file_exists($file)) {
         $php = Config::getCurrentPhpName();
         $this->logger->warn("Sorry, I can't find the {$file} file for php {$php}.");
         return;
     }
     Utils::editor($file);
 }
开发者ID:phpbrew,项目名称:phpbrew,代码行数:10,代码来源:ConfigCommand.php


示例11: createInterpreter

/** @return Tester\Runner\PhpInterpreter */
function createInterpreter()
{
    if (defined('HHVM_VERSION')) {
        return new Tester\Runner\HhvmPhpInterpreter(PHP_BINARY);
    } elseif (defined('PHPDBG_VERSION')) {
        return new Tester\Runner\ZendPhpDbgInterpreter(PHP_BINARY, ' -c ' . Tester\Helpers::escapeArg(php_ini_loaded_file()));
    } else {
        return new Tester\Runner\ZendPhpInterpreter(PHP_BINARY, ' -c ' . Tester\Helpers::escapeArg(php_ini_loaded_file()));
    }
}
开发者ID:re1la2pse,项目名称:detinsky_projekt,代码行数:11,代码来源:bootstrap.php


示例12: getAll

 /**
  * Returns an array of php.ini locations with at least one entry
  *
  * The equivalent of calling php_ini_loaded_file then php_ini_scanned_files.
  * The loaded ini location is the first entry and may be empty.
  * @return array
  */
 public static function getAll()
 {
     if ($env = strval(getenv(self::ENV_ORIGINAL))) {
         return explode(PATH_SEPARATOR, $env);
     }
     $paths = array(strval(php_ini_loaded_file()));
     if ($scanned = php_ini_scanned_files()) {
         $paths = array_merge($paths, array_map('trim', explode(',', $scanned)));
     }
     return $paths;
 }
开发者ID:Rudloff,项目名称:composer,代码行数:18,代码来源:IniHelper.php


示例13: getEnvironment

 public static function getEnvironment(Context $context)
 {
     $environment = [];
     $environment['server'] = ['title' => _i('Server Information'), 'data' => [['title' => _i('Web Server Software'), 'value' => $_SERVER['SERVER_SOFTWARE'], 'alert' => ['type' => 'warning', 'condition' => (bool) preg_match('/nginx/i', $_SERVER['SERVER_SOFTWARE']), 'title' => 'Warning', 'string' => _i('The nginx web server has its own internal file size limit variable for uploads. It is recommended that this value be set at the same value set in the PHP configuration file.')]], ['title' => _i('PHP Version'), 'value' => PHP_VERSION, 'alert' => ['type' => 'important', 'condition' => version_compare(PHP_VERSION, '5.4.0') < 0, 'title' => _i('Please Update Immediately'), 'string' => _i('The minimum requirements to run this software is 5.4.0.')]]]];
     $environment['software'] = ['title' => _i('Software Information'), 'data' => [['title' => _i('FoolFrame Version'), 'value' => $context->getService('config')->get('foolz/foolframe', 'package', 'main.version'), 'alert' => ['type' => 'info', 'condition' => true, 'title' => _i('New Update Available'), 'string' => _i('There is a new version of the software available for download.')]]]];
     $environment['php-configuration'] = ['title' => _i('PHP Configuration'), 'data' => [['title' => _i('Config Location'), 'value' => php_ini_loaded_file(), 'description' => _i('This is the path to the location of the php.ini configuration file.')], ['title' => 'allow_url_fopen', 'value' => ini_get('allow_url_fopen') ? _i('On') : _i('Off'), 'description' => _i('This option enables the URL-aware fopen wrappers that allows access to remote files using the FTP or HTTP protocol.'), 'alert' => ['type' => 'important', 'condition' => (bool) (!ini_get('allow_url_fopen')), 'title' => _i('Critical'), 'string' => _i('The PHP configuration on the server currently has URL-aware fopen wrappers disabled. The software will be operating at limited functionality.')]], ['title' => 'max_execution_time', 'value' => ini_get('max_execution_time'), 'description' => _i('This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(ini_get('max_execution_time')) < 60), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum execution time is below the suggested value.')]], ['title' => 'file_uploads', 'value' => ini_get('file_uploads') ? _i('On') : _i('Off'), 'description' => _i('This sets whether or not to allow HTTP file uploads.'), 'alert' => ['type' => 'important', 'condition' => (bool) (!ini_get('file_uploads')), 'title' => _i('Critical'), 'string' => _i('The PHP configuration on the server currently has file uploads disabled. This option must be enabled for the software to fully function.')]], ['title' => 'post_max_size', 'value' => ini_get('post_max_size'), 'description' => _i('This sets the maximum size of POST data allowed.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(substr(ini_get('post_max_size'), 0, -1)) < 16), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum POST data size is below the suggested value.')]], ['title' => 'upload_max_filesize', 'value' => ini_get('upload_max_filesize'), 'description' => _i('This sets the maximum size allowed to be uploaded.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(substr(ini_get('upload_max_filesize'), 0, -1)) < 16), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum upload file size is below the suggested value.')]], ['title' => 'max_file_uploads', 'value' => ini_get('max_file_uploads'), 'description' => _i('This sets the maximum number of files allowed to be uploaded concurrently.'), 'alert' => ['type' => 'warning', 'condition' => (bool) (intval(ini_get('max_file_uploads')) < 60), 'title' => _i('Warning'), 'string' => _i('Your current value for maximum number of concurrent uploads is below the suggested value.')]]]];
     $environment['php-extensions'] = ['title' => _i('PHP Extensions'), 'data' => [['title' => 'APC', 'value' => extension_loaded('apc') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'warning', 'condition' => (bool) (!extension_loaded('apc')), 'title' => _i('Warning'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'APC')]], ['title' => 'cURL', 'value' => extension_loaded('curl') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('curl')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'cURL')]], ['title' => 'FileInfo', 'value' => extension_loaded('fileinfo') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('fileinfo')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'FileInfo')]], ['title' => 'JSON', 'value' => extension_loaded('json') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('json')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'JSON')]], ['title' => 'Multi-byte String', 'value' => extension_loaded('mbstring') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('mbstring')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'Multi-byte String')]], ['title' => 'MySQLi', 'value' => extension_loaded('mysqli') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('mysqli')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'MySQLi')]], ['title' => 'PDO MySQL', 'value' => extension_loaded('pdo_mysql') ? _i('Installed') : _i('Unavailable'), 'alert' => ['type' => 'important', 'condition' => (bool) (!extension_loaded('pdo_mysql')), 'title' => _i('Critical'), 'string' => _i('Your PHP environment shows that you do not have the "%s" extension installed. This may limit the functionality of the software.', 'PDO MySQL')]]]];
     $environment = Hook::forge('Foolz\\FoolFrame\\Model\\System::getEnvironment#var.environment')->setParam('environment', $environment)->execute()->get($environment);
     usort($environment['php-extensions']['data'], array('System', 'sortByTitle'));
     return $environment;
 }
开发者ID:KasaiDot,项目名称:FoolFrame,代码行数:11,代码来源:System.php


示例14: collectConfigurationFiles

function collectConfigurationFiles()
{
    $files = array(php_ini_loaded_file());
    $scannedFiles = php_ini_scanned_files();
    if ($scannedFiles) {
        foreach (explode(',', $scannedFiles) as $file) {
            array_push($files, trim($file));
        }
    }
    return $files;
}
开发者ID:Hensyy,项目名称:mysite,代码行数:11,代码来源:_intellij_phpdebug_validator.php


示例15: vtiger_extensionloader_suggest

 function vtiger_extensionloader_suggest()
 {
     $PHPVER = sprintf("%s.%s", PHP_MAJOR_VERSION, PHP_MINOR_VERSION);
     $OSHWINFO = str_replace('Darwin', 'Mac', PHP_OS) . '_' . php_uname('m');
     $WIN = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? true : false;
     $EXTFNAME = 'vtigerextn_loader';
     $EXTNFILE = $EXTFNAME . ($WIN ? '.dll' : '.so');
     $DISTFILE = sprintf("%s_%s_%s.so", $EXTFNAME, $PHPVER, $OSHWINFO);
     $DISTFILEZIP = sprintf("%s_%s_%s-yyyymmdd.zip", $EXTFNAME, $PHPVER, $OSHWINFO);
     return array('loader_zip' => $DISTFILEZIP, 'loader_file' => $DISTFILE, 'php_ini' => php_ini_loaded_file(), 'extensions_dir' => ini_get('extension_dir'));
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:11,代码来源:LoaderSuggest.php


示例16: getPhpArguments

 protected static function getPhpArguments()
 {
     $arguments = array();
     $phpFinder = new PhpExecutableFinder();
     if (method_exists($phpFinder, 'findArguments')) {
         $arguments = $phpFinder->findArguments();
     }
     if (false !== ($ini = php_ini_loaded_file())) {
         $arguments[] = '--php-ini=' . $ini;
     }
     return $arguments;
 }
开发者ID:proyecto404,项目名称:UtilBundle,代码行数:12,代码来源:RunTestCommand.php


示例17: assembleSystemInfos

 /**
  * Assemble the complete stack of System Informations
  *
  * @return array
  */
 private function assembleSystemInfos()
 {
     // get system informations and server variables
     $sysinfos = array();
     // WEBSERVER
     if (is_callable('apache_get_version')) {
         $sysinfos['apache_get_version'] = apache_get_version();
         $sysinfos['apache_modules'] = apache_get_modules();
         asort($sysinfos['apache_modules']);
     }
     // fetch server's IP address and it's name
     $sysinfos['server_ip'] = gethostbyname($_SERVER['SERVER_NAME']);
     $sysinfos['server_name'] = gethostbyaddr($sysinfos['server_ip']);
     // PHP
     // Get Interface Webserver<->PHP (Server-API)
     $sysinfos['php_sapi_name'] = php_sapi_name();
     // Is the SERVER-API an CGI (until PHP 5.3) or CGI_FCGI?
     if (substr($sysinfos['php_sapi_name'], 0, 3) == 'cgi') {
         $sysinfos['php_sapi_cgi'] = true;
     }
     $sysinfos['php_uname'] = php_uname();
     $sysinfos['php_os'] = PHP_OS;
     $sysinfos['php_os_bit'] = PHP_INT_SIZE * 8 . 'Bit';
     $sysinfos['php_sapi'] = PHP_SAPI;
     // @todo check out, if this is the same as php_sapi_name?
     $sysinfos['phpversion'] = phpversion();
     $sysinfos['php_extensions'] = get_loaded_extensions();
     asort($sysinfos['php_extensions']);
     $sysinfos['zendversion'] = zend_version();
     $sysinfos['path_to_phpini'] = php_ini_loaded_file();
     $sysinfos['cfg_include_path'] = get_cfg_var('include_path');
     $sysinfos['cfg_file_path'] = realpath(get_cfg_var("cfg_file_path"));
     $sysinfos['zend_thread_safty'] = (int) function_exists('zend_thread_id');
     $sysinfos['open_basedir'] = (int) ini_get('open_basedir');
     $sysinfos['memory_limit'] = ini_get('memory_limit');
     $sysinfos['allow_url_fopen'] = (int) ini_get('allow_url_fopen');
     $sysinfos['allow_url_include'] = (int) ini_get('allow_url_include');
     $sysinfos['file_uploads'] = ini_get('file_uploads');
     $sysinfos['upload_max_filesize'] = ini_get('upload_max_filesize');
     $sysinfos['post_max_size'] = ini_get('post_max_size');
     $sysinfos['disable_functions'] = (int) ini_get('disable_functions');
     $sysinfos['disable_classes'] = (int) ini_get('disable_classes');
     $sysinfos['enable_dl'] = (int) ini_get('enable_dl');
     $sysinfos['filter_default'] = ini_get('filter.default');
     $sysinfos['zend_ze1_compatibility_mode'] = (int) ini_get('zend.ze1_compatibility_mode');
     $sysinfos['unicode_semantics'] = (int) ini_get('unicode.semantics');
     $sysinfos['mbstring_func_overload'] = ini_get('mbstring.func_overload');
     $sysinfos['max_input_time'] = ini_get('max_input_time');
     $sysinfos['max_execution_time'] = ini_get('max_execution_time');
     return $sysinfos;
 }
开发者ID:Clansuite,项目名称:Clansuite,代码行数:56,代码来源:SysteminfoAdminController.php


示例18: makeSalt

    /**
     * Creates some pseudo random jibberish to be used as a salt value.
     * @access public
     * @static
     * @return string
     * @author Jason D Snider <[email protected]>
     */
    public static function makeSalt()
    {
        $seed = openssl_random_pseudo_bytes(4096);
        $seed .= String::uuid();
        $seed .= mt_rand(1000000000, 2147483647);
        $seed .= Security::hash(php_ini_loaded_file(), 'sha512', true);

        if(is_dir(DS . 'var')){
            $seed .= Security::hash(implode(scandir(DS . 'var')), 'sha512');
        }

        $salt = $hash = Security::hash($seed, 'sha512', true);

        return $salt;
    }
开发者ID:42northgroup,项目名称:42Viral,代码行数:22,代码来源:Sec.php


示例19: launchSubProcess

 /**
  * Launch sub process
  *
  * @return array The new sub process and its STDIN, STDOUT, STDERR pipes – or FALSE if an error occurred.
  * @throws \RuntimeException
  */
 protected function launchSubProcess()
 {
     $systemCommand = 'FLOW_ROOTPATH=' . FLOW_PATH_ROOT . ' FLOW_PATH_TEMPORARY_BASE=' . escapeshellarg(FLOW_PATH_TEMPORARY_BASE) . ' FLOW_CONTEXT=' . (string) $this->context . ' ' . PHP_BINDIR . '/php -c ' . php_ini_loaded_file() . ' ' . FLOW_PATH_FLOW . 'Scripts/flow.php' . ' --start-slave';
     $descriptorSpecification = [['pipe', 'r'], ['pipe', 'w'], ['pipe', 'a']];
     $this->subProcess = proc_open($systemCommand, $descriptorSpecification, $this->pipes);
     if (!is_resource($this->subProcess)) {
         throw new \RuntimeException('Could not execute sub process.');
     }
     $read = [$this->pipes[1]];
     $write = null;
     $except = null;
     $readTimeout = 30;
     stream_select($read, $write, $except, $readTimeout);
     $subProcessStatus = proc_get_status($this->subProcess);
     return $subProcessStatus['running'] === true ? [$this->subProcess, $this->pipes] : false;
 }
开发者ID:neos,项目名称:flow-development-collection,代码行数:22,代码来源:SubProcess.php


示例20: launchSubProcess

 /**
  * Launch sub process
  *
  * @return array The new sub process and its STDIN, STDOUT, STDERR pipes – or FALSE if an error occurred.
  * @throws \RuntimeException
  */
 protected function launchSubProcess()
 {
     $systemCommand = 'FLOW_ROOTPATH=' . escapeshellarg(FLOW_PATH_ROOT) . ' FLOW_CONTEXT=' . (string) $this->context . ' ' . PHP_BINDIR . '/php -c ' . escapeshellarg(php_ini_loaded_file()) . ' ' . escapeshellarg(FLOW_PATH_FLOW . 'Scripts/flow.php') . ' --start-slave';
     $descriptorSpecification = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'a'));
     $this->subProcess = proc_open($systemCommand, $descriptorSpecification, $this->pipes);
     if (!is_resource($this->subProcess)) {
         throw new \RuntimeException('Could not execute sub process.');
     }
     $read = array($this->pipes[1]);
     $write = NULL;
     $except = NULL;
     $readTimeout = 30;
     stream_select($read, $write, $except, $readTimeout);
     $subProcessStatus = proc_get_status($this->subProcess);
     return $subProcessStatus['running'] === TRUE ? array($this->subProcess, $this->pipes) : FALSE;
 }
开发者ID:nlx-sascha,项目名称:flow-development-collection,代码行数:22,代码来源:SubProcess.php



注:本文中的php_ini_loaded_file函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP php_ini_scanned_files函数代码示例发布时间:2022-05-15
下一篇:
PHP php_cli_server_start函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap