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

PHP is_writable函数代码示例

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

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



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

示例1: run

 /**
  * {@inheritdoc}
  */
 public function run()
 {
     if (is_null($this->dst) || "" === $this->dst) {
         return Result::error($this, 'You must specify a destination file with to() method.');
     }
     if (!$this->checkResources($this->files, 'file')) {
         return Result::error($this, 'Source files are missing!');
     }
     if (file_exists($this->dst) && !is_writable($this->dst)) {
         return Result::error($this, 'Destination already exists and cannot be overwritten.');
     }
     $dump = '';
     foreach ($this->files as $path) {
         foreach (glob($path) as $file) {
             $dump .= file_get_contents($file) . "\n";
         }
     }
     $this->printTaskInfo('Writing {destination}', ['destination' => $this->dst]);
     $dst = $this->dst . '.part';
     $write_result = file_put_contents($dst, $dump);
     if (false === $write_result) {
         @unlink($dst);
         return Result::error($this, 'File write failed.');
     }
     // Cannot be cross-volume; should always succeed.
     @rename($dst, $this->dst);
     return Result::success($this);
 }
开发者ID:greg-1-anderson,项目名称:Robo,代码行数:31,代码来源:Concat.php


示例2: __construct

 /**
  * Tests that the storage location is a directory and is writable.
  */
 public function __construct($filename)
 {
     // Get the directory name
     $directory = str_replace('\\', '/', realpath(pathinfo($filename, PATHINFO_DIRNAME))) . '/';
     // Set the filename from the real directory path
     $filename = $directory . basename($filename);
     // Make sure the cache directory is writable
     if (!is_dir($directory) or !is_writable($directory)) {
         throw new KoException('Cache: Directory :name is unwritable.', array(':name' => $directory));
     }
     // Make sure the cache database is writable
     if (is_file($filename) and !is_writable($filename)) {
         throw new KoException('Cache: File :name is unwritable.', array(':name' => $filename));
     }
     // Open up an instance of the database
     $this->db = new SQLiteDatabase($filename, '0666', $error);
     // Throw an exception if there's an error
     if (!empty($error)) {
         throw new KoException('Cache: Driver error - ' . sqlite_error_string($error));
     }
     $query = "SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'caches'";
     $tables = $this->db->query($query, SQLITE_BOTH, $error);
     // Throw an exception if there's an error
     if (!empty($error)) {
         throw new KoException('Cache: Driver error - ' . sqlite_error_string($error));
     }
     if ($tables->numRows() == 0) {
         // Issue a CREATE TABLE command
         $this->db->unbufferedQuery('CREATE TABLE caches(id VARCHAR(127) PRIMARY KEY, expiration INTEGER, cache TEXT);');
     }
 }
开发者ID:atlas1308,项目名称:testtesttestfarm,代码行数:34,代码来源:sqlite.php


示例3: initialize

 /**
  * {@inheritDoc}
  */
 public function initialize()
 {
     if (Filesystem::isLocalPath($this->url)) {
         $this->repoDir = $this->url;
     } else {
         $cacheDir = $this->config->get('cache-vcs-dir');
         $this->repoDir = $cacheDir . '/' . preg_replace('{[^a-z0-9]}i', '-', $this->url) . '/';
         $fs = new Filesystem();
         $fs->ensureDirectoryExists($cacheDir);
         if (!is_writable(dirname($this->repoDir))) {
             throw new \RuntimeException('Can not clone ' . $this->url . ' to access package information. The "' . $cacheDir . '" directory is not writable by the current user.');
         }
         // update the repo if it is a valid hg repository
         if (is_dir($this->repoDir) && 0 === $this->process->execute('hg summary', $output, $this->repoDir)) {
             if (0 !== $this->process->execute('hg pull', $output, $this->repoDir)) {
                 $this->io->write('<error>Failed to update ' . $this->url . ', package information from this repository may be outdated (' . $this->process->getErrorOutput() . ')</error>');
             }
         } else {
             // clean up directory and do a fresh clone into it
             $fs->removeDirectory($this->repoDir);
             if (0 !== $this->process->execute(sprintf('hg clone --noupdate %s %s', ProcessExecutor::escape($this->url), ProcessExecutor::escape($this->repoDir)), $output, $cacheDir)) {
                 $output = $this->process->getErrorOutput();
                 if (0 !== $this->process->execute('hg --version', $ignoredOutput)) {
                     throw new \RuntimeException('Failed to clone ' . $this->url . ', hg was not found, check that it is installed and in your PATH env.' . "\n\n" . $this->process->getErrorOutput());
                 }
                 throw new \RuntimeException('Failed to clone ' . $this->url . ', could not read packages from it' . "\n\n" . $output);
             }
         }
     }
     $this->getTags();
     $this->getBranches();
 }
开发者ID:composer-fork,项目名称:composer,代码行数:35,代码来源:HgDriver.php


示例4: initialize

 /**
  * Initializes this logger.
  *
  * Available options:
  *
  * - file:        The file path or a php wrapper to log messages
  *                You can use any support php wrapper. To write logs to the Apache error log, use php://stderr
  * - format:      The log line format (default to %time% %type% [%priority%] %message%%EOL%)
  * - time_format: The log time strftime format (default to %b %d %H:%M:%S)
  * - dir_mode:    The mode to use when creating a directory (default to 0777)
  * - file_mode:   The mode to use when creating a file (default to 0666)
  *
  * @param  sfEventDispatcher $dispatcher  A sfEventDispatcher instance
  * @param  array             $options     An array of options.
  *
  * @return Boolean      true, if initialization completes successfully, otherwise false.
  */
 public function initialize(sfEventDispatcher $dispatcher, $options = array())
 {
     if (!isset($options['file'])) {
         throw new sfConfigurationException('You must provide a "file" parameter for this logger.');
     }
     if (isset($options['format'])) {
         $this->format = $options['format'];
     }
     if (isset($options['time_format'])) {
         $this->timeFormat = $options['time_format'];
     }
     if (isset($options['type'])) {
         $this->type = $options['type'];
     }
     $dir = dirname($options['file']);
     if (!is_dir($dir)) {
         mkdir($dir, isset($options['dir_mode']) ? $options['dir_mode'] : 0777, true);
     }
     $fileExists = file_exists($options['file']);
     if (!is_writable($dir) || $fileExists && !is_writable($options['file'])) {
         throw new sfFileException(sprintf('Unable to open the log file "%s" for writing.', $options['file']));
     }
     $this->fp = fopen($options['file'], 'a');
     if (!$fileExists) {
         chmod($options['file'], isset($options['file_mode']) ? $options['file_mode'] : 0666);
     }
     return parent::initialize($dispatcher, $options);
 }
开发者ID:kcornejo,项目名称:estadistica,代码行数:45,代码来源:sfFileLogger.class.php


示例5: prepare_dir

 public static function prepare_dir($prefix)
 {
     $config = midcom_baseclasses_components_configuration::get('midcom.helper.filesync', 'config');
     $path = $config->get('filesync_path');
     if (!file_exists($path)) {
         $parent = dirname($path);
         if (!is_writable($parent)) {
             throw new midcom_error("Directory {$parent} is not writable");
         }
         if (!mkdir($path)) {
             throw new midcom_error("Failed to create directory {$path}. Reason: " . $php_errormsg);
         }
     }
     if (substr($path, -1) != '/') {
         $path .= '/';
     }
     $module_dir = "{$path}{$prefix}";
     if (!file_exists($module_dir)) {
         if (!is_writable($path)) {
             throw new midcom_error("Directory {$path} is not writable");
         }
         if (!mkdir($module_dir)) {
             throw new midcom_error("Failed to create directory {$module_dir}. Reason: " . $php_errormsg);
         }
     }
     return "{$module_dir}/";
 }
开发者ID:nemein,项目名称:openpsa,代码行数:27,代码来源:interfaces.php


示例6: template

 /**
  * Compiles a template and writes it to a cache file, which is used for inclusion.
  *
  * @param string $file The full path to the template that will be compiled.
  * @param array $options Options for compilation include:
  *        - `path`: Path where the compiled template should be written.
  *        - `fallback`: Boolean indicating that if the compilation failed for some
  *                      reason (e.g. `path` is not writable), that the compiled template
  *                      should still be returned and no exception be thrown.
  * @return string The compiled template.
  */
 public static function template($file, array $options = array())
 {
     $cachePath = Libraries::get(true, 'resources') . '/tmp/cache/templates';
     $defaults = array('path' => $cachePath, 'fallback' => false);
     $options += $defaults;
     $stats = stat($file);
     $oname = basename(dirname($file)) . '_' . basename($file, '.php');
     $oname .= '_' . ($stats['ino'] ?: hash('md5', $file));
     $template = "template_{$oname}_{$stats['mtime']}_{$stats['size']}.php";
     $template = "{$options['path']}/{$template}";
     if (file_exists($template)) {
         return $template;
     }
     $compiled = static::compile(file_get_contents($file));
     if (is_writable($cachePath) && file_put_contents($template, $compiled) !== false) {
         foreach (glob("{$options['path']}/template_{$oname}_*.php", GLOB_NOSORT) as $expired) {
             if ($expired !== $template) {
                 unlink($expired);
             }
         }
         return $template;
     }
     if ($options['fallback']) {
         return $file;
     }
     throw new TemplateException("Could not write compiled template `{$template}` to cache.");
 }
开发者ID:fedeisas,项目名称:lithium,代码行数:38,代码来源:Compiler.php


示例7: execute

 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $realCacheDir = $this->getContainer()->getParameter('kernel.cache_dir');
     $oldCacheDir = $realCacheDir . '_old';
     $filesystem = $this->getContainer()->get('filesystem');
     if (!is_writable($realCacheDir)) {
         throw new \RuntimeException(sprintf('Unable to write in the "%s" directory', $realCacheDir));
     }
     if ($filesystem->exists($oldCacheDir)) {
         $filesystem->remove($oldCacheDir);
     }
     $kernel = $this->getContainer()->get('kernel');
     $output->writeln(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>', $kernel->getEnvironment(), var_export($kernel->isDebug(), true)));
     $this->getContainer()->get('cache_clearer')->clear($realCacheDir);
     if ($input->getOption('no-warmup')) {
         $filesystem->rename($realCacheDir, $oldCacheDir);
     } else {
         // the warmup cache dir name must have the same length than the real one
         // to avoid the many problems in serialized resources files
         $warmupDir = substr($realCacheDir, 0, -1) . '_';
         if ($filesystem->exists($warmupDir)) {
             $filesystem->remove($warmupDir);
         }
         $this->warmup($warmupDir, $realCacheDir, !$input->getOption('no-optional-warmers'));
         $filesystem->rename($realCacheDir, $oldCacheDir);
         if (defined('PHP_WINDOWS_VERSION_BUILD')) {
             sleep(1);
             // workaround for windows php rename bug
         }
         $filesystem->rename($warmupDir, $realCacheDir);
     }
     $filesystem->remove($oldCacheDir);
 }
开发者ID:ronaldlunaramos,项目名称:webstore,代码行数:36,代码来源:CacheClearCommand.php


示例8: __construct

 /**
  * Constructor.
  * Requires a path to an existing and writable file.
  * 
  * @param string $outputPath path to file to write schema changes to. 
  */
 public function __construct($outputPath)
 {
     if (!file_exists($outputPath) || !is_writable($outputPath)) {
         throw new RedBean_Exception_Security('Cannot write to file: ' . $outputPath);
     }
     $this->file = $outputPath;
 }
开发者ID:daviddeutsch,项目名称:redbean-adaptive,代码行数:13,代码来源:TimeLine.php


示例9: getStep2

 public function getStep2()
 {
     $this->layout->step = 2;
     $data['req']['php_version'] = PHP_VERSION_ID >= 50400;
     $data['req']['mcrypt'] = extension_loaded('mcrypt');
     $data['req']['pdo'] = extension_loaded('pdo_mysql');
     if (function_exists('apache_get_modules')) {
         $data['req']['rewrite'] = in_array('mod_rewrite', apache_get_modules());
     }
     $dirs = array($_SERVER['DOCUMENT_ROOT'] . '/apps/frontend/storage/', $_SERVER['DOCUMENT_ROOT'] . '/apps/backend/storage/', $_SERVER['DOCUMENT_ROOT'] . '/upload/', $_SERVER['DOCUMENT_ROOT'] . '/install/', $_SERVER['DOCUMENT_ROOT'] . '/apps/frontend/config/', $_SERVER['DOCUMENT_ROOT'] . '/apps/backend/config/');
     foreach ($dirs as $path) {
         $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
         foreach ($iterator as $item) {
             @chmod($item, 0777);
         }
     }
     $data['req']['wr_fr_storage'] = is_writable($_SERVER['DOCUMENT_ROOT'] . '/apps/frontend/storage/');
     $data['req']['wr_bk_storage'] = is_writable($_SERVER['DOCUMENT_ROOT'] . '/apps/backend/storage/');
     $data['req']['wr_upload'] = is_writable($_SERVER['DOCUMENT_ROOT'] . '/upload/');
     $data['req']['wr_install'] = is_writable($_SERVER['DOCUMENT_ROOT'] . '/install/');
     $data['req']['wr_fr_db'] = is_writable($_SERVER['DOCUMENT_ROOT'] . '/apps/frontend/config/');
     $data['req']['wr_bk_db'] = is_writable($_SERVER['DOCUMENT_ROOT'] . '/apps/backend/config/');
     $data['valid_step'] = true;
     foreach ($data['req'] as $valid) {
         $data['valid_step'] = $data['valid_step'] && $valid;
     }
     Session::put('step2', $data['valid_step']);
     $this->layout->content = View::make('install::step2', $data);
     return $this->layout;
 }
开发者ID:vcorobceanu,项目名称:WebAPL,代码行数:30,代码来源:InstallController.php


示例10: storeEntity

 /**
  * Storing entity by ORM table
  *
  * @access public
  * @return boolean
  */
 public function storeEntity($buffer = null)
 {
     try {
         // Data posted required, otherwise avoid write anything
         if (!$buffer) {
             throw new JMapException(JText::_('COM_JMAP_HTACCESS_NO_DATA'), 'error');
         }
         $targetHtaccess = null;
         // Find htaccess file
         if (JFile::exists(JPATH_ROOT . '/.htaccess')) {
             $targetHtaccess = JPATH_ROOT . '/.htaccess';
         } elseif (JFile::exists(JPATH_ROOT . '/htaccess.txt')) {
             // Fallback on txt dummy version
             $targetHtaccess = JPATH_ROOT . '/htaccess.txt';
             $this->setState('htaccess_version', 'textual');
         } else {
             throw new JMapException(JText::_('COM_JMAP_HTACCESS_NOTFOUND'), 'error');
         }
         // If file permissions ko on rewrite updated contents
         if (!is_writable($targetHtaccess)) {
             @chmod($targetHtaccess, 0777);
         }
         if (@(!JFile::write($targetHtaccess, $buffer))) {
             throw new JMapException(JText::_('COM_JMAP_ERROR_WRITING_HTACCESS'), 'error');
         }
     } catch (JMapException $e) {
         $this->setError($e);
         return false;
     } catch (Exception $e) {
         $jmapException = new JMapException($e->getMessage(), 'error');
         $this->setError($jmapException);
         return false;
     }
     return true;
 }
开发者ID:site4com,项目名称:prometheus,代码行数:41,代码来源:htaccess.php


示例11: dowork

function dowork()
{
    $canIhaveAccess = 0;
    $canIhaveAccess = $canIhaveAccess + checklevel('admin');
    if ($canIhaveAccess == 1) {
        if (is_writable('settings.php') == 0) {
            die("Error: settings.php is not writeable.");
        }
        if (isset($_REQUEST['action'])) {
            $action = $_REQUEST['action'];
        } else {
            $action = "view";
        }
        if ($action == "view") {
            $config = new pliggconfig();
            if (isset($_REQUEST['page'])) {
                $config->var_page = $_REQUEST['page'];
                $config->showpage();
            }
        }
        if ($action == "save") {
            $config = new pliggconfig();
            $config->var_id = substr($_REQUEST['var_id'], 6, 10);
            $config->var_value = $_REQUEST['var_value'];
            $config->store();
        }
    }
}
开发者ID:bendroid,项目名称:pligg-cms,代码行数:28,代码来源:delete.php


示例12: save_future_list

 public static function save_future_list($list, $save_type = FILE_APPEND)
 {
     $file = self::get_parent_dir() . self::$future_list_file;
     $data_to_write = '';
     $errors = array();
     if (!file_exists($file)) {
         $f = fopen($file, 'w');
         if ($f === false) {
             $errors['error'] = "Cannot crete future list file <code>" . $file . "</code>";
         } else {
             fclose($f);
         }
     }
     foreach ($list as $el) {
         $data_to_write .= trim($el['name']) . " ::: " . $el['link'] . "\n";
     }
     if (is_writable($file)) {
         if (file_put_contents($file, $data_to_write, $save_type) == false) {
             $errors['error'] = 'Cannot write to file <code>' . $file . "</code>";
         }
     } else {
         $errors['error'] = 'File is not writable <code>' . $file . "</code>";
     }
     return $errors;
 }
开发者ID:flotzilla,项目名称:rtracker,代码行数:25,代码来源:Utils.php


示例13: addIndexFile

 private static function addIndexFile($path)
 {
     if (file_exists($path) || !is_writable($path)) {
         return;
     }
     file_put_contents($path . 'index.php', '<?php header("location: ../index.php"); die;');
 }
开发者ID:ameoba32,项目名称:tiki,代码行数:7,代码来源:CleanVendors.php


示例14: check

 public function check()
 {
     if (phpversion() < '5.0.0') {
         return Response::json(FAIL, array('您的php版本过低,不能安装本软件,请升级到5.0.0或更高版本再安装,谢谢!'));
     }
     if (!extension_loaded('PDO')) {
         return Response::json(FAIL, array('请加载PHP的PDO模块,谢谢!'));
     }
     if (!function_exists('session_start')) {
         return Response::json(FAIL, array('请开启session,谢谢!'));
     }
     if (!is_writable(ROOT_PATH)) {
         return Response::json(FAIL, array('请保证代码目录有写权限,谢谢!'));
     }
     $config = (require CONFIG_PATH . 'mysql.php');
     try {
         $mysql = new PDO('mysql:host=' . $config['master']['host'] . ';port=' . $config['master']['port'], $config['master']['user'], $config['master']['pwd']);
     } catch (Exception $e) {
         return Response::json(FAIL, array('请正确输入信息连接mysql,保证启动mysql,谢谢!'));
     }
     $mysql->exec('CREATE DATABASE ' . $config['master']['dbname']);
     $mysql = null;
     unset($config);
     return Response::json(SUCC, array('检测通过'));
 }
开发者ID:swg0110,项目名称:iBarn,代码行数:25,代码来源:Install.class.php


示例15: isWritable

 function isWritable($sFile, $sPrePath = '/../../')
 {
     clearstatcache();
     $aPathInfo = pathinfo(__FILE__);
     $sFile = $aPathInfo['dirname'] . '/../../' . $sFile;
     return is_readable($sFile) && is_writable($sFile);
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:7,代码来源:BxDolIO.php


示例16: execute

 /**
  * @see Console\Command\Command
  */
 protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
 {
     $dm = $this->getHelper('documentManager')->getDocumentManager();
     $metadatas = $dm->getMetadataFactory()->getAllMetadata();
     $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter'));
     // Process destination directory
     if (($destPath = $input->getArgument('dest-path')) === null) {
         $destPath = $dm->getConfiguration()->getProxyDir();
     }
     if (!is_dir($destPath)) {
         mkdir($destPath, 0775, true);
     }
     $destPath = realpath($destPath);
     if (!file_exists($destPath)) {
         throw new \InvalidArgumentException(sprintf("Proxies destination directory '<info>%s</info>' does not exist.", $destPath));
     } elseif (!is_writable($destPath)) {
         throw new \InvalidArgumentException(sprintf("Proxies destination directory '<info>%s</info>' does not have write permissions.", $destPath));
     }
     if (count($metadatas)) {
         foreach ($metadatas as $metadata) {
             $output->write(sprintf('Processing document "<info>%s</info>"', $metadata->name) . PHP_EOL);
         }
         // Generating Proxies
         $dm->getProxyFactory()->generateProxyClasses($metadatas, $destPath);
         // Outputting information message
         $output->write(PHP_EOL . sprintf('Proxy classes generated to "<info>%s</INFO>"', $destPath) . PHP_EOL);
     } else {
         $output->write('No Metadata Classes to process.' . PHP_EOL);
     }
 }
开发者ID:alcaeus,项目名称:mongodb-odm,代码行数:33,代码来源:GenerateProxiesCommand.php


示例17: isWritable

 function isWritable($path)
 {
     if (is_writable($path) || self::isOwner($path)) {
         return true;
     }
     return false;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:7,代码来源:kunena.file.class.1.5.php


示例18: at_generator_validate_generator

/**
 * Validate form values.
 */
function at_generator_validate_generator(&$form, &$form_state) {
  $build_info = $form_state->getBuildInfo();
  $values = $form_state->getValues();
  $theme = $build_info['args'][0];

  // Validate Theme Generator.
  if (!empty($values['generate']['generate_machine_name']) && $theme == 'at_core') {
    $machine_name  = $values['generate']['generate_machine_name'];
    $path   = drupal_get_path('theme', 'at_core');
    $target = $path . '/../../' . $machine_name;

    $subtheme_type    = $values['generate']['generate_type'];
    $skin_base_theme  = $values['generate']['generate_skin_base'];
    $clone_source     = $values['generate']['generate_clone_source'];

    if ($subtheme_type == 'at_standard' || $subtheme_type == 'at_minimal' || $subtheme_type == 'at_skin') {
      $source = $path . '/../at_starterkits/' . $subtheme_type;
    }
    else if ($subtheme_type == 'at_clone') {
      $clone_source_theme = drupal_get_path('theme', $clone_source);
      $source = $clone_source_theme;
    }

    // Check if directories and files exist and are readable/writable etc.
    if (!file_exists($source) && !is_readable($source)) {
      $form_state->setErrorByName('', t('The Starterkit or base theme (if you are generating a Skin) can not be found or is not readable - check permissions or perhaps you moved things around?'));
    }
    if (!is_writable(dirname($target))) {
      $form_state->setErrorByName('', t('The target directory is not writable, please check permissions on the <code>/themes/</code> directory where Adaptivetheme is located.'));
    }
  }
}
开发者ID:jno84,项目名称:drupal8,代码行数:35,代码来源:generator_validate.php


示例19: folders

 public function folders()
 {
     global $mf_domain;
     $dir_list = "";
     $dir_list2 = "";
     wp_mkdir_p(MF_FILES_DIR);
     wp_mkdir_p(MF_CACHE_DIR);
     if (!is_dir(MF_CACHE_DIR)) {
         $dir_list2 .= "<li>" . MF_CACHE_DIR . "</li>";
     } elseif (!is_writable(MF_CACHE_DIR)) {
         $dir_list .= "<li>" . MF_CACHE_DIR . "</li>";
     }
     if (!is_dir(MF_FILES_DIR)) {
         $dir_list2 .= "<li>" . MF_FILES_DIR . "</li>";
     } elseif (!is_writable(MF_FILES_DIR)) {
         $dir_list .= "<li>" . MF_FILES_DIR . "</li>";
     }
     if ($dir_list2 != "") {
         echo "<div id='magic-fields-install-error-message' class='error'><p><strong>" . __('Magic Fields is not ready yet.', $mf_domain) . "</strong> " . __('must create the following folders (and must chmod 777):', $mf_domain) . "</p><ul>";
         echo $dir_list2;
         echo "</ul></div>";
     }
     if ($dir_list != "") {
         echo "<div id='magic-fields-install-error-message-2' class='error'><p><strong>" . __('Magic Fields is not ready yet.', $mf_domain) . "</strong> " . __('The following folders must be writable (usually chmod 777 is neccesary):', $mf_domain) . "</p><ul>";
         echo $dir_list;
         echo "</ul></div>";
     }
 }
开发者ID:mark2me,项目名称:pressform,代码行数:28,代码来源:mf_install.php


示例20: start

	public static function start(){
		//PHP
		self::$params["safe_mode"] = (int) ini_get("safe_mode");
		self::$params["safe_mode_gid"] = (int) ini_get("safe_mode_gid");
		self::$params["upload_max_size"] = ini_get("upload_max_filesize");
    	self::$params["post_max_size"] = ini_get("post_max_size");
		self::$params["memory_limit"] = ((ini_get("memory_limit")!="")?ini_get("memory_limit"):get_cfg_var("memory_limit"));
		self::$params["max_execution_time"] = ini_get("max_execution_time");
		
		$uploadTmpDir = ini_get("upload_tmp_dir");
		$uploadTmpDir = $uploadTmpDir ? $uploadTmpDir : realpath(sys_get_temp_dir()); 
		self::$params["upload_tmp_dir"] = $uploadTmpDir;		
		self::$params["upload_tmp_dir_writable"] =  @is_writable($uploadTmpDir);
		self::$params["output_buffering"] = (int)  !! ini_get('output_buffering');
		
		//ZLIB
		self::$params["zlib"] = (int) function_exists('gzopen');
		
		
		//For future or commercial versions
		self::$params["xml_parser_create"] = (int) function_exists("xml_parser_create");
		//GD
		self::$params['gd'] = (int) (function_exists("gd_info") && function_exists("imagecopyresized") && function_exists("imagecopyresampled")) ;
			
		
		self::liveTests();
	}
开发者ID:utopszkij,项目名称:lmp,代码行数:27,代码来源:diaghelper.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP is_writable_windows函数代码示例发布时间:2022-05-15
下一篇:
PHP is_wp_error函数代码示例发布时间: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