PageRenderTime 378ms queryTime 37ms sortTime 5ms getByIdsTime 110ms findMatchingLines 160ms

100+ results results for 'php is_writable repo:gmarrot/jelix' (378 ms)

Not the results you expected?
File.php https://gitlab.com/devtoannh/cafe | PHP | 468 lines
                    
25 */
                    
26require_once 'Zend/CodeGenerator/Php/Abstract.php';
                    
27
                    
30 */
                    
31require_once 'Zend/CodeGenerator/Php/Class.php';
                    
32
                    
38 */
                    
39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract
                    
40{
                    
86        if ($fileName == '') {
                    
87            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
113            if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) {
                    
114                require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
115                throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');
                    
                
File.php https://github.com/basdog22/Qool.git | PHP | 468 lines
                    
25 */
                    
26require_once 'Zend/CodeGenerator/Php/Abstract.php';
                    
27
                    
30 */
                    
31require_once 'Zend/CodeGenerator/Php/Class.php';
                    
32
                    
38 */
                    
39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract
                    
40{
                    
86        if ($fileName == '') {
                    
87            require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
113            if ( ($realpath = Zend_Reflection_File::findRealpathInIncludePath($filePath)) === false) {
                    
114                require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
115                throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');
                    
                
func_common.php https://github.com/shoitokazu/GNS-idemitsu-Job.git | PHP | 311 lines
                    
1<?php
                    
2function return_error($msg="不正なアクセスです。") {
                    
3	echo "<p>$msg</p>";
                    
4	include "footer.php";
                    
5	exit();
                    
8	$filename = 'c:\\debug.txt';
                    
9	if (is_writable($filename)) {
                    
10		if (!$handle = fopen($filename, 'a')) {
                    
75function echo_button_customer($eid) {
                    
76	echo "<input type='button' value='選択' onClick='openNormalWindow(\"../customer/search.php?select=".$eid."&ccode=\" + document.getElementById(\"$eid\").value);'>";
                    
77}
                    
78function echo_button_article($eid) {
                    
79	echo "<input type='button' value='選択' onClick='openNormalWindow(\"../article/search.php?select=".$eid."&acode=\" + document.getElementById(\"$eid\").value);'>";
                    
80}
                    
81function echo_button_machine($meid, $ceid="") {
                    
82	echo "<input type='button' value='選択' onClick='openNormalWindow(\"../machine/search.php?select=$meid,$ceid&mcode=\" + document.getElementById(\"$meid\").value";
                    
83	if ($ceid<>"") {
                    
                
File.php https://github.com/grandison/budo16.git | PHP | 465 lines
                    
25 */
                    
26// require_once 'Zend/CodeGenerator/Php/Abstract.php';
                    
27
                    
30 */
                    
31// require_once 'Zend/CodeGenerator/Php/Class.php';
                    
32
                    
38 */
                    
39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract
                    
40{
                    
86        if ($fileName == '') {
                    
87            // require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
113            if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) {
                    
114                // require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
115                throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');
                    
                
self_test.php https://github.com/sharpmachine/wakeupmedia.com.git | PHP | 314 lines
                    
32            PHP Version:
                    
33            <?php if (PHP_VERSION >= 5): ?>
                    
34            <code><?php echo PHP_VERSION; ?></code>
                    
35            <?php else: ?>
                    
36            <code><?php echo PHP_VERSION; ?></code>;
                    
37            <?php endif; ?>
                    
105            <code>Installed (XCache)</code>
                    
106            <?php elseif (PHP_VERSION >= 6): ?>
                    
107            <code>PHP6</code>
                    
237            <?php if (file_exists($path)): ?>
                    
238                <?php if (w3_is_writable($path)): ?>
                    
239                <code>OK</code>
                    
266            <code>Error: <?php echo htmlspecialchars($uploads_dir['error']); ?></code>
                    
267            <?php elseif (!w3_is_writable_dir($uploads_dir['path'])): ?>
                    
268            <code>Not write-able</code>
                    
                
setup.php https://github.com/Doap/xoops.git | PHP | 202 lines
                    
176define("_INSTALL_REQUIREMENT_SERVER_MOD_REWRITE", "Apache \"mod_rewrite\" module is required, check <a href='http://httpd.apache.org/docs/current/mod/mod_rewrite.html' title='mod_rewrite' target='_blank'>mod_rewrite</a> for details.");
                    
177define("_INSTALL_REQUIREMENT_SERVER_NOT_SUPPORTED", "The webserver is currently not supported, please use <a href='http://nginx.net' title='nginx' target='_blank'>nginx</a> or <a href='http://www.php.net/manual/en/book.apache.php' target='_blank' title='Apache'>Apache</a>.");
                    
178define("_INSTALL_REQUIREMENT_PHP", "PHP");
                    
179define("_INSTALL_REQUIREMENT_PDO", "PDO drivers");
                    
180define("_INSTALL_REQUIREMENT_PDO_PROMPT", "PHP Data Objects (PDO) extension with MySQL driver is required for regular Xoops Engine instances, check <a href='http://www.php.net/manual/en/book.pdo.php' title='PDO' target='_blank'>PDO manual</a> for details.");
                    
181define("_INSTALL_REQUIREMENT_PERSIST", "Persist options");
                    
190define("_INSTALL_EXTENSION_APC", "APC");
                    
191define("_INSTALL_EXTENSION_APC_PROMPT", 'The Alternative PHP Cache (APC) is highly recommended for high-performance senario. Refer to <a href="http://www.php.net/manual/en/intro.apc.php" target="_blank" title="APC introduction">APC introduction</a> for details.');
                    
192define("_INSTALL_EXTENSION_REDIS", "Redis");
                    
194define("_INSTALL_EXTENSION_MEMCACHED", "Memcached");
                    
195define("_INSTALL_EXTENSION_MEMCACHED_PROMPT", 'Memcached is highly recommended for high-performance yet robust distributed senario. Refer to <a href="http://www.php.net/manual/en/intro.memcached.php" target="_blank" title="Memcached introduction">Memcached introduction</a> for details.');
                    
196define("_INSTALL_EXTENSION_MEMCACHE", "Memcache");
                    
196define("_INSTALL_EXTENSION_MEMCACHE", "Memcache");
                    
197define("_INSTALL_EXTENSION_MEMCACHE_PROMPT", 'Memcache a widely used cache engine. Refer to <a href="http://www.php.net/manual/en/intro.memcache.php" target="_blank" title="Memcache introduction">Memcache introduction</a> for details.');
                    
198define("_INSTALL_EXTENSION_FILE", 'File');
                    
                
plain.class.php https://github.com/godber/PHXdata-Website.git | PHP | 328 lines
                    
1<?php
                    
2/**
                    
28      }else{
                    
29        if(@is_writable($config_cascade['plainauth.users']['default'])){
                    
30          $this->cando['addUser']      = true;
                    
                
ext_imagick.cpp https://github.com/tstarling/hiphop-php.git | C++ | 359 lines
                    
2   +----------------------------------------------------------------------+
                    
3   | HipHop for PHP                                                       |
                    
4   +----------------------------------------------------------------------+
                    
5   | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com)     |
                    
6   | Copyright (c) 1997-2010 The PHP Group                                |
                    
7   +----------------------------------------------------------------------+
                    
7   +----------------------------------------------------------------------+
                    
8   | This source file is subject to version 3.01 of the PHP license,      |
                    
9   | that is bundled with this package in the file LICENSE, and is        |
                    
10   | available through the world-wide-web at the following url:           |
                    
11   | http://www.php.net/license/3_01.txt                                  |
                    
12   | If you did not receive a copy of the PHP license and are unable to   |
                    
13   | obtain it through the world-wide-web, please send a note to          |
                    
14   | license@php.net so we can mail you a copy immediately.               |
                    
15   +----------------------------------------------------------------------+
                    
                
file_helper.php https://bitbucket.org/fusioninvoice_it/fusioninvoice.git | PHP | 479 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 *
                    
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)))
                    
314					// There are known problems using is_weritable on IIS.  It may not be reliable - consider fileperms()
                    
315					$fileinfo['writable'] = is_writable($file);
                    
316					break;
                    
334 *
                    
335 * Translates a file extension into a mime type based on config/mimes.php.
                    
336 * Returns FALSE if it can't determine the type, or open the mime config file
                    
354		{
                    
355			if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
                    
356			{
                    
                
file_helper.php https://github.com/viruskimera/Agencia.git | PHP | 479 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 *
                    
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)))
                    
314					// There are known problems using is_weritable on IIS.  It may not be reliable - consider fileperms()
                    
315					$fileinfo['writable'] = is_writable($file);
                    
316					break;
                    
334 *
                    
335 * Translates a file extension into a mime type based on config/mimes.php.
                    
336 * Returns FALSE if it can't determine the type, or open the mime config file
                    
477
                    
478/* End of file file_helper.php */
                    
479/* Location: ./system/helpers/file_helper.php */
                    
                
CAssetManager.php https://bitbucket.org/rezanachmad/php-selenium-training.git | PHP | 334 lines
                    
1<?php
                    
2/**
                    
46	 * In particular, symbolic links are supported only on Linux/Unix, and Windows Vista/2008 or greater.
                    
47	 * The latter requires PHP 5.3 or greater.
                    
48	 *
                    
71	 * @var integer the permission to be set for newly generated asset files.
                    
72	 * This value will be used by PHP chmod function.
                    
73	 * Defaults to 0666, meaning the file is read-writable by all users.
                    
78	 * @var integer the permission to be set for newly generated asset directories.
                    
79	 * This value will be used by PHP chmod function.
                    
80	 * Defaults to 0777, meaning the directory can be read, written and executed by all users.
                    
134	{
                    
135		if(($basePath=realpath($value))!==false && is_dir($basePath) && is_writable($basePath))
                    
136			$this->_basePath=$basePath;
                    
                
mailz.php https://bitbucket.org/antonyravel/cape-resorts.git | PHP | 374 lines
                    
73
                    
74	if (($ssp=session_save_path()) && !is_writable($ssp)) $warnings[]='PHP sessions are not properly configured on your server, the sessions save path '.$ssp.' is not writable.';
                    
75
                    
75
                    
76	if (phpversion() < '5')	$warnings[]="You are running PHP version ".phpversion().". You require PHP version 5.2 or higher for this plugin, with version 5.3 recommended.";
                    
77	if (!function_exists('curl_init')) $warnings[]="You need to have cURL installed. Contact your hosting provider to do so.";
                    
227		$buffer=str_replace('./?','admin.php?'.'page=mailz_cp&zlist=index&',$buffer);
                    
228		if (isset($_GET['zlistpage'])) $buffer=str_replace('<form method=post >','<form method=post action="'.$admin.'admin.php?page=mailz_cp&zlist=index&zlistpage='.$_GET['zlistpage'].'">',$buffer);
                    
229		$buffer=str_replace('name="page"','name="zlistpage"',$buffer);
                    
230		$buffer=str_replace('<form method="get" name="listcontrol" action="">','<form method="get" name="listcontrol" action="admin.php"><input type="hidden" value="mailz-users" name="page"/>',$buffer);
                    
231		$buffer=str_replace('<form method="get" name="listcontrol">','<form method="get" name="listcontrol" action="admin.php"><input type="hidden" value="mailz-users" name="page"/>',$buffer);
                    
232		if (isset($_GET['zlistpage'])) $buffer=str_replace('<form method=get>','<form method=get><input type="hidden" name="page" value="mailz_cp" /><input type="hidden" name="zlist" value="index" /><input type="hidden" name="zlistpage" value="'.$_GET['zlistpage'].'" />',$buffer);
                    
233		if (isset($_GET['zlistpage'])) $buffer=str_replace('<form method="post" action="">','<form method=post action="'.$admin.'admin.php?page=mailz_cp&zlist=index&zlistpage='.$_GET['zlistpage'].'">',$buffer);
                    
234		$buffer=str_replace(ZING_PHPLIST_URL.'/?',$admin.'admin.php?page=mailz_cp&zlist=index&',$buffer);
                    
235		$buffer=str_replace('./FCKeditor',ZING_PHPLIST_URL.'/admin/FCKeditor',$buffer);
                    
                
reputation_settings.php https://github.com/cybernet/CyBerFuN-CoDeX.git | PHP | 286 lines
                    
1<?php
                    
2require_once "include/bittorrent.php";
                    
2require_once "include/bittorrent.php";
                    
3require_once "include/bbcode_functions.php";
                    
4require_once "include/user_functions.php";
                    
9    // moddifed logginorreturn by retro//Remember to change the following line to match your server
                    
10    print("<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 ".$SITENAME." Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n");
                    
11    die();
                    
14	if ( get_user_class() < UC_ADMINISTRATOR )
                    
15		header( "Location: $BASEURL/index.php" );
                    
16		
                    
17		
                    
18$rep_set_cache = "cache/rep_settings_cache.php";
                    
19
                    
35		
                    
36		$rep_out = "<"."?php\n\n\$GVARS = array(\n";
                    
37		
                    
                
file.test.php https://github.com/FlorianH/Markab.git | PHP | 472 lines
                    
6 *
                    
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
                    
8 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
                    
15 * @package       cake
                    
16 * @subpackage    cake.tests.cases.libs
                    
17 * @since         CakePHP(tm) v 1.2.0.4206
                    
18 * @license       http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
                    
58			'dirname' => dirname(__FILE__), 'basename' => basename(__FILE__),
                    
59			'extension' => 'php', 'filename' =>'file.test'
                    
60		);
                    
451		$tmpFile = TMP . 'tests' . DS . 'cakephp.file.test.tmp';
                    
452		if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) {
                    
453			return $tmpFile;
                    
                
systemCheck.php https://gitlab.com/tjaafar/SuiteCRM | PHP | 289 lines
                    
1<?php
                    
2if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
                    
46 * *******************************************************************************/
                    
47logThis('[At systemCheck.php]');
                    
48
                    
78	if($isWindows) {
                    
79		if(!is_writable_windows($file)) {
                    
80			logThis('WINDOWS: File ['.$file.'] not readable - saving for display');
                    
91	} else {
                    
92		if(!is_writable($file)) {
                    
93			logThis('File ['.$file.'] not writable - saving for display');
                    
162$checks = array(
                    
163	'phpVersion'				=> $mod_strings['LBL_UW_COMPLIANCE_PHP_VERSION'],
                    
164    'dbVersion'                 => $mod_strings['LBL_UW_COMPLIANCE_DB'],
                    
179	$stop = true;
                    
180	$phpIniLocation = get_cfg_var("cfg_file_path");
                    
181
                    
                
file_info_context_module.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 347 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
152
                    
153        $urlbase = $CFG->wwwroot.'/pluginfile.php';
                    
154        return new file_info_stored($this->browser, $this->context, $storedfile, $urlbase, get_string('moduleintro'), false, true, true, false);
                    
187
                    
188        $urlbase = $CFG->wwwroot.'/pluginfile.php';
                    
189        return new file_info_stored($this->browser, $this->context, $storedfile, $urlbase, get_string('activitybackup', 'repository'), false, $downloadable, $uploadable, false);
                    
205     */
                    
206    public function is_writable() {
                    
207        return false;
                    
                
SplFileInfo.php https://github.com/tstarling/hiphop-php.git | PHP | 432 lines
                    
4/**
                    
5 * ( excerpt from http://php.net/manual/en/class.splfileinfo.php )
                    
6 *
                    
18  /**
                    
19   * ( excerpt from http://php.net/manual/en/splfileinfo.construct.php )
                    
20   *
                    
190  /**
                    
191   * ( excerpt from http://php.net/manual/en/splfileinfo.getmtime.php )
                    
192   *
                    
395  /**
                    
396   * ( excerpt from http://php.net/manual/en/splfileinfo.setfileclass.php )
                    
397   *
                    
411  /**
                    
412   * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php )
                    
413   *
                    
                
bootstrap.php https://github.com/jamiepratt/moodle.git | PHP | 236 lines
                    
74} else if (version_compare($phpunitversion, '3.6.0', 'lt')) {
                    
75    phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITWRONG, $phpunitversion);
                    
76}
                    
79if (!include_once('PHPUnit/Extensions/Database/Autoload.php')) {
                    
80    phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITEXTMISSING, 'phpunit/DbUnit');
                    
81}
                    
108if (!isset($CFG->phpunit_dataroot)) {
                    
109    phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, 'Missing $CFG->phpunit_dataroot in config.php, can not run tests!');
                    
110}
                    
158if (!isset($CFG->phpunit_prefix)) {
                    
159    phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, 'Missing $CFG->phpunit_prefix in config.php, can not run tests!');
                    
160}
                    
164if (isset($CFG->prefix) and $CFG->prefix === $CFG->phpunit_prefix) {
                    
165    phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, '$CFG->prefix and $CFG->phpunit_prefix must not be identical, can not run tests!');
                    
166}
                    
                
File.php https://github.com/kervin/kyzstudio.git | PHP | 465 lines
                    
25 */
                    
26#require_once 'Zend/CodeGenerator/Php/Abstract.php';
                    
27
                    
30 */
                    
31#require_once 'Zend/CodeGenerator/Php/Class.php';
                    
32
                    
38 */
                    
39class Zend_CodeGenerator_Php_File extends Zend_CodeGenerator_Php_Abstract
                    
40{
                    
86        if ($fileName == '') {
                    
87            #require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
88            throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.');
                    
113            if ( ($realpath = Zend_Reflection_file::findRealpathInIncludePath($filePath)) === false) {
                    
114                #require_once 'Zend/CodeGenerator/Php/Exception.php';
                    
115                throw new Zend_CodeGenerator_Php_Exception('No file for ' . $realpath . ' was found.');
                    
                
sqlite.php https://gitlab.com/webbroteam/satisfaction-mvc | PHP | 484 lines
                    
1<?php
                    
2/**
                    
3 *
                    
4 * This file is part of phpFastCache.
                    
5 *
                    
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
                    
                
modphpthumb.class.php https://bitbucket.org/orchdork10159/dnsman.ly.git | PHP | 205 lines
                    
5 */
                    
6require_once MODX_CORE_PATH.'model/phpthumb/phpthumb.class.php';
                    
7/**
                    
13 */
                    
14class modPhpThumb extends phpThumb {
                    
15
                    
43        $this->setParameter('config_nohotlink_text_message',(string)$this->modx->getOption('phpthumb_nohotlink_text_message',$this->config,'Off-server thumbnailing is not allowed'));
                    
44        $this->setParameter('config_nooffsitelink_enabled',(boolean)$this->modx->getOption('phpthumb_nooffsitelink_enabled',$this->config,false));
                    
45        $this->setParameter('config_nooffsitelink_valid_domains',explode(',', $this->modx->getOption('phpthumb_nooffsitelink_valid_domains',$this->config,$this->modx->getOption('http_host'))));
                    
101        phpthumb_functions::EnsureDirectoryExists(dirname($this->cache_filename));
                    
102        if ((file_exists($this->cache_filename) && is_writable($this->cache_filename)) || is_writable(dirname($this->cache_filename))) {
                    
103            $this->CleanUpCacheDirectory();
                    
197        }
                    
198        $downloadfilename = phpthumb_functions::SanitizeFilename(@$_GET['sia'] ? $_GET['sia'] : (@$_GET['down'] ? $_GET['down'] : 'phpThumb_generated_thumbnail'.(@$_GET['f'] ? $_GET['f'] : 'jpg')));
                    
199        if (@$downloadfilename) {
                    
                
interface.php https://bitbucket.org/mrmustarde/manhattan-beach.git | PHP | 293 lines
                    
27			<a href="<?php echo wp_nonce_url( admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG . '&amp;hmbkp_download_backup=' . $encoded_file . '&amp;hmbkp_schedule_id=' . $schedule->get_id() ), 'hmbkp-download_backup' ); ?>"><?php _e( 'Download', 'hmbkp' ); ?></a> |
                    
28			<a href="<?php echo wp_nonce_url( admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG . '&amp;hmbkp_delete_backup=' . $encoded_file . '&amp;hmbkp_schedule_id=' . $schedule->get_id() ), 'hmbkp-delete_backup' ); ?>" class="delete-action"><?php _e( 'Delete', 'hmbkp' ); ?></a>
                    
29
                    
71		function hmbkp_safe_mode_warning() {
                    
72			echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress has detected a problem.', 'hmbkp' ) . '</strong> ' . sprintf( __( '%1$s is running in %2$s, please contact your host and ask them to disable it. BackUpWordPress may not work correctly whilst %3$s is on.', 'hmbkp' ), '<code>PHP</code>', sprintf( '<a href="%1$s">%2$s</a>', __( 'http://php.net/manual/en/features.safe-mode.php', 'hmbkp' ), __( 'Safe Mode', 'hmbkp' ) ), '<code>' . __( 'Safe Mode', 'hmbkp' ) . '</code>' ) . '</p></div>';
                    
73		}
                    
244	
                    
245	<span class="hmbkp-status"><?php echo $schedule->get_status() ? $schedule->get_status() : __( 'Starting Backup', 'hmbkp' ); ?> <a href="<?php echo add_query_arg( array( 'action' => 'hmbkp_cancel', 'hmbkp_schedule_id' => $schedule->get_id() ), HMBKP_ADMIN_URL ); ?>"><?php _e( 'cancel', 'hmbkp' ); ?></a></span>
                    
246
                    
251	<?php if ( $schedule->get_type() !== 'database' ) { ?>
                    
252		<a class="fancybox" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_edit_schedule_excludes_load', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Excludes', 'hmbkp' ); ?></a>  |
                    
253	<?php } ?>
                    
254
                    
255		<a class="hmbkp-run" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_run_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Run now', 'hmbkp' ); ?></a>  |
                    
256
                    
                
search.php https://github.com/Lurttinen/customisation-db.git | PHP | 407 lines
                    
1<?php
                    
2/**
                    
5* @version $Id$
                    
6* @copyright (c) 2008 phpBB Customisation Database Team
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
25
                    
26// Using the phpBB ezcomponents loader
                    
27titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
                    
27titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
                    
28phpbb_ezcomponents_loader::load_component('search');
                    
29
                    
58			{
                    
59				if (!is_writable(TITANIA_ROOT . self::store_path))
                    
60				{
                    
265		// For those without moderator permissions do not display unapproved stuff
                    
266		if (!phpbb::$auth->acl_get('m_'))
                    
267		{
                    
                
shp.php https://bitbucket.org/pavolve/masterskayaludmila.git | PHP | 426 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * ESRI Shape file import plugin for phpMyAdmin
                    
4 *
                    
4 *
                    
5 * @package PhpMyAdmin-Import
                    
6 * @subpackage ESRI_Shape
                    
7 */
                    
8if (! defined('PHPMYADMIN')) {
                    
9    exit;
                    
33    set_include_path(get_include_path() . PATH_SEPARATOR . getcwd() . '/libraries/bfShapeFiles/');
                    
34    include_once './libraries/bfShapeFiles/ShapeFile.lib.php';
                    
35
                    
58    /**
                    
59     * This class extends ShapeFile class to cater the following phpMyAdmin
                    
60     * specific requirements.
                    
                
testutil.py https://github.com/rudyvallejos/GestionItems.git | Python | 303 lines
                    
82
                    
83    def test_sets_if_it_is_writable(self):
                    
84        assert hasattr(self.adapter, 'is_writable'), \
                    
84        assert hasattr(self.adapter, 'is_writable'), \
                    
85               "The adapter doesn't have the 'is_writable' attribute; " \
                    
86               "please call its parent's constructor too"
                    
135    * python
                    
136    * php
                    
137    
                    
167            u'python': set(),
                    
168            u'php': set()
                    
169        }
                    
256    
                    
257    new_items = set((u'python', u'php'))
                    
258    
                    
                
Abstract.php https://github.com/hettema/Stages.git | PHP | 393 lines
                    
1<?php
                    
2/**
                    
31
                    
32        if (is_writable($this->getSessionSavePath())) {
                    
33            session_save_path($this->getSessionSavePath());
                    
                
Loader.php https://gitlab.com/r.collas/site_central | PHP | 548 lines
                    
1<?php
                    
2/**
                    
12
                    
13require_once 'Exception.php';
                    
14
                    
102
                    
103		if($writable && !is_writable($realpath))
                    
104			return false;
                    
139
                    
140		if($writable && !is_writable($realpath))
                    
141			return false;
                    
167
                    
168		return str_replace('_', DIRECTORY_SEPARATOR, $class_name).'.php';
                    
169
                    
275		$space = $is_cli ? ' ' : '&nbsp;';
                    
276		$crlf = $is_cli ? PHP_EOL : '<br />';
                    
277		
                    
                
Logger.php https://gitlab.com/hoanghung.dev/phunuvadoisong.com | PHP | 456 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Logger.php
                    
4 *
                    
383		// TODO: Might want to push out an exception (eternity loop?) here or just die.
                    
384		//if (!is_writable($logFile))
                    
385		//	return;
                    
                
class-wp-filesystem-ftpext.php https://gitlab.com/thisishayat/itv-2016 | PHP | 602 lines
                    
1<?php
                    
2/**
                    
30		if ( ! extension_loaded('ftp') ) {
                    
31			$this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available'));
                    
32			return;
                    
380	 */
                    
381	public function is_writable($file) {
                    
382		return true;
                    
                
file_info_context_coursecat.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 302 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
118        $filename = is_null($filename) ? '.' : $filename;
                    
119        $urlbase = $CFG->wwwroot.'/pluginfile.php';
                    
120        if (!$storedfile = $fs->get_file($this->context->id, 'coursecat', 'description', 0, $filepath, $filename)) {
                    
145     */
                    
146    public function is_writable() {
                    
147        return false;
                    
192        global $DB, $CFG;
                    
193        require_once($CFG->libdir.'/modinfolib.php');
                    
194
                    
                
admin_style_add.php https://github.com/Sweil/Frogsystem-2.git | PHP | 246 lines
                    
1<?php if (!defined('ACP_GO')) die('Unauthorized access!');
                    
2
                    
96// Check for file rights
                    
97if ( !is_writable ( FS2STYLES ) ) {
                    
98    systext ( $FD->text("admin", "style_folder_not_writable").'<br>'.$FD->text("admin", "error_file_access"),
                    
                
theme-editor.php https://gitlab.com/Gashler/dp | PHP | 246 lines
                    
83	if ( is_writeable( $file ) ) {
                    
84		//is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
                    
85		$f = fopen( $file, 'w+' );
                    
172	<?php if ( $theme->parent() ) : ?>
                    
173	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
174	<?php endif; ?>
                    
189?>
                    
190		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
191<?php
                    
211		<?php echo $docs_select; ?>
                    
212		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
213		</div>
                    
217		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
218			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
219			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
                
skeleditor_fonctions.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 318 lines
                    
1<?php
                    
2
                    
44			$output .= skeleditor_tree_open_close_dir($current_dir,$dir,$current_file);
                    
45		if (!is_writable($dir))
                    
46			$output .= "<div style='background:#3ff'>";
                    
                
search.php https://github.com/Noxwizard/customisation-db.git | PHP | 407 lines
                    
1<?php
                    
2/**
                    
5* @version $Id$
                    
6* @copyright (c) 2008 phpBB Customisation Database Team
                    
7* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
                    
25
                    
26// Using the phpBB ezcomponents loader
                    
27titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
                    
27titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
                    
28phpbb_ezcomponents_loader::load_component('search');
                    
29
                    
58			{
                    
59				if (!is_writable(TITANIA_ROOT . self::store_path))
                    
60				{
                    
265		// For those without moderator permissions do not display unapproved stuff
                    
266		if (!phpbb::$auth->acl_get('m_'))
                    
267		{
                    
                
files.php https://gitlab.com/webbroteam/satisfaction-mvc | PHP | 306 lines
                    
3 *
                    
4 * This file is part of phpFastCache.
                    
5 *
                    
17use phpFastCache\Core\DriverAbstract;
                    
18use phpFastCache\Exceptions\phpFastCacheDriverException;
                    
19
                    
29     * @param array $config
                    
30     * @throws phpFastCacheDriverException
                    
31     */
                    
37        if (!$this->checkdriver() && !isset($config[ 'skipError' ])) {
                    
38            throw new phpFastCacheDriverException("Can't use this driver for your website!");
                    
39        }
                    
46    {
                    
47        if (is_writable($this->getPath())) {
                    
48            return true;
                    
                
skeleditor_fonctions.php https://bitbucket.org/pombredanne/spip-zone-treemap.git | PHP | 334 lines
                    
1<?php
                    
2/**
                    
38		$class="fichier";
                    
39		if (!is_writable($path_base.$dir))
                    
40			$class .= " readonly";
                    
271
                    
272		case 'php':
                    
273		case 'html':
                    
276			$parsers = array("parsexml.js", "parsecss.js", "tokenizejavascript.js", "parsejavascript.js",
                    
277                     "../contrib/php/js/tokenizephp.js", "../contrib/php/js/parsephp.js",
                    
278                     "../contrib/php/js/parsephphtmlmixed.js");
                    
278                     "../contrib/php/js/parsephphtmlmixed.js");
                    
279			$css = array("css/xmlcolors.css", "css/jscolors.css", "css/csscolors.css", "contrib/php/css/phpcolors.css");
                    
280			break;
                    
                
theme-editor.php https://gitlab.com/darmawan.fatria/df-skp-2014 | PHP | 241 lines
                    
83	if ( is_writeable( $file ) ) {
                    
84		// is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
                    
85		$f = fopen( $file, 'w+' );
                    
169	<?php if ( $theme->parent() ) : ?>
                    
170	<p class="howto"><?php printf( __( 'This child theme inherits templates from a parent theme, %s.' ), '<a href="' . self_admin_url('theme-editor.php?theme=' . urlencode( $theme->get_template() ) ) . '">' . $theme->parent()->display('Name') . '</a>' ); ?></p>
                    
171	<?php endif; ?>
                    
186?>
                    
187		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
188<?php
                    
208		<?php echo $docs_select; ?>
                    
209		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
210		</div>
                    
214		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
215			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
216			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
                
search.php https://github.com/marc1706/customisation-db.git | PHP | 406 lines
                    
1<?php
                    
2/**
                    
4* @package Titania
                    
5* @copyright (c) 2008 phpBB Customisation Database Team
                    
6* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License, version 2
                    
24
                    
25// Using the phpBB ezcomponents loader
                    
26titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
                    
26titania::_include('library/ezcomponents/loader', false, 'phpbb_ezcomponents_loader');
                    
27phpbb_ezcomponents_loader::load_component('search');
                    
28
                    
57			{
                    
58				if (!is_writable(TITANIA_ROOT . self::store_path))
                    
59				{
                    
264		// For those without moderator permissions do not display unapproved stuff
                    
265		if (!phpbb::$auth->acl_get('m_'))
                    
266		{
                    
                
FileWriter.php https://gitlab.com/campus-academy/krowkaramel | PHP | 341 lines
                    
1<?php
                    
2/**
                    
118    public function writable(){
                    
119        return ! $this->disabled() && $this->fs->is_writable( $this->getPath() );
                    
120    }
                    
317        // Deny list of executable file extensions, noting that specific actions may limit this further.
                    
318        // Note that this ignores the base file name, so "php.pot" would be permitted, but "foo.php.pot" would not.
                    
319        $exts = array_slice( explode('.', $this->file->basename() ), 1 );
                    
319        $exts = array_slice( explode('.', $this->file->basename() ), 1 );
                    
320        if( preg_grep('/^php\\d*/i', $exts ) ){
                    
321            throw new Loco_error_WriteException('Executable file extension disallowed .'.implode('.',$exts) );
                    
                
quirks.php https://github.com/CCI-Studios/Wee-Magazine.git | PHP | 444 lines
                    
1<?php
                    
2/**
                    
3 * Akeeba Engine
                    
4 * The modular PHP5 site backup engine
                    
5 * @copyright Copyright (c)2009-2012 Nicholas K. Dionysopoulos
                    
38			}
                    
39			$status['output']= @is_writable($outdir);
                    
40
                    
217	/**
                    
218	 * Q103 - HIGH - Less than 10" of max_execution_time with PHP Safe Mode enabled
                    
219	 *
                    
300	/**
                    
301	 * Q201 - HIGH  - PHP4 detected
                    
302	 * Note: Q201 was originally a LOW severity quirk, but Akeeba Engine 3 no longer
                    
302	 * Note: Q201 was originally a LOW severity quirk, but Akeeba Engine 3 no longer
                    
303	 * works on PHP4.
                    
304	 * @return bool
                    
                
index.php https://github.com/Doap/FrogCMS.git | PHP | 251 lines
                    
95        include 'schema_'.$_POST['config']['db_driver'].'.php';
                    
96        include 'sql_data.php';
                    
97        
                    
130  <strong>Error</strong>: config.php doesn't exist<br />
                    
131<?php } else if ( ! is_writable($config_file)) { ?>
                    
132  <strong>Error</strong>: config.php must be writable<br />
                    
133<?php } ?>
                    
134<?php if ( ! is_writable('../public/')): ?>
                    
135  <strong>Error</strong>: public/ folder must be writable<br />
                    
138
                    
139<?php if ( ! defined('DEBUG')): ?>
                    
140<form action="index.php" method="post">
                    
247<div id="footer">
                    
248  <p>This system was made with <a href="http://www.php.net" target="_blank">PHP</a> and is powered by <a href="http://www.madebyfrog.com/">Frog CMS</a></p>
                    
249</div>
                    
                
mms-patches.inc.php https://gitlab.com/Gashler/dp | PHP | 150 lines
                    
74
                    
75									$wp_login_file = ABSPATH . "wp-login.php"; // This works for both WordPress® 3.0 and 3.1. WordPress® 3.1+ uses: `site_url('wp-signup.php')`. WordPress® 3.5+ uses: `network_site_url('wp-signup.php')`.
                    
76									$wp_login_section = "/([\r\n\t\s ]+)(wp_redirect( *?)\(( *?)apply_filters( *?)\(( *?)['\"]wp_signup_location['\"],( *?)(site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|network_site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|get_bloginfo( *?)\(['\"]wpurl['\"]\)( *?)\.( *?)['\"]\/wp-signup\.php['\"])( *?)\)( *?)\);)([\r\n\t\s ]+)(exit;)/";
                    
76									$wp_login_section = "/([\r\n\t\s ]+)(wp_redirect( *?)\(( *?)apply_filters( *?)\(( *?)['\"]wp_signup_location['\"],( *?)(site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|network_site_url( *?)\(( *?)['\"]wp-signup\.php['\"]( *?)\)|get_bloginfo( *?)\(['\"]wpurl['\"]\)( *?)\.( *?)['\"]\/wp-signup\.php['\"])( *?)\)( *?)\);)([\r\n\t\s ]+)(exit;)/";
                    
77									$wp_login_replace = "\n\t\t// Modified for full plugin compatiblity.\n\t\t//wp_redirect( apply_filters( 'wp_signup_location', network_site_url('wp-signup.php') ) );\n\t\t//exit;";
                    
78
                    
78
                    
79									if (file_exists ($wp_login_file) && ($wp_login = file_get_contents ($wp_login_file)) && is_writable ($wp_login_file))
                    
80										{
                    
101											else if (!$load_patched) // Otherwise, we need to report that /wp-includes/load.php could NOT be updated. Wrong WordPress® version?
                    
102												($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/load.php</code> file could NOT be patched. Unverifiable.', true) : null;
                    
103										}
                    
130												($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file ' . (($ms_functions_patched_already) ? 'is patched' : 'has been patched successfully') . '.') : null;
                    
131											else if (!$ms_functions_written) // Otherwise, we need to report that /wp-includes/ms-functions.php could NOT be updated. Possibly a permissions error.
                    
132												($display_notices) ? c_ws_plugin__s2member_admin_notices::display_admin_notice ('Your <code>/wp-includes/ms-functions.php</code> file could NOT be patched. Patch NOT written.', true) : null;
                    
                
configure.php https://github.com/robertleeplummerjr/bluebox.git | PHP | 179 lines
                    
114        $file_uploads = ini_get('file_uploads');
                    
115        if (empty($file_uploads) || $file_uploads === false) $issues['errors'][] = 'PHP setting ' . html::anchor('http://www.php.net/manual/en/ini.core.php', 'file_uploads', array(
                    
116            'target' => '_blank'
                    
129        $post_max_size = self::return_bytes(ini_get('post_max_size'));
                    
130        if (empty($post_max_size) || (int)$post_max_size < $min_upload_max_filesize) $issues['errors'][] = 'PHP setting ' . html::anchor('http://www.php.net/manual/en/ini.core.php#ini.post-max-size', 'post_max_size ', array(
                    
131            'target' => '_blank'
                    
141        )) . ' is bellow ' . self::bytesToMb($min_upload_max_filesize + $min_script_memory_limit) . '!';
                    
142        else if ($memory_limit != - 1 && (int)$memory_limit < ($recommended_upload_max_filesize + $min_script_memory_limit)) $issues['warnings'][] = 'PHP setting ' . html::anchor('http://www.php.net/manual/en/ini.core.php#ini.memory-limit', 'memory_limit ', array(
                    
143            'target' => '_blank'
                    
147        $max_execution_time = ini_get('max_execution_time');
                    
148        if (empty($max_execution_time) || (int)$max_execution_time < $min_max_execution_time) $issues['errors'][] = 'PHP setting ' . html::anchor('http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time', 'max_execution_time ', array(
                    
149            'target' => '_blank'
                    
156        $max_input_time = ini_get('max_input_time');
                    
157        if (empty($max_input_time) || (int)$max_input_time < $min_max_execution_time * 2) $issues['errors'][] = 'PHP setting ' . html::anchor('http://www.php.net/manual/en/info.configuration.php#ini.max_input_time', 'max_input_time ', array(
                    
158            'target' => '_blank'
                    
                
template-editor.Manage.php https://github.com/KenBoyer/CompactCMS.git | PHP | 334 lines
                    
127		<div class="span-10 right last">
                    
128			<form action="<?php echo $_SERVER['PHP_SELF']; ?>" id="changeTmp" method="get" class="right" accept-charset="utf-8">
                    
129				<label for="template"><?php echo $ccms['lang']['backend']['template'];?></label>
                    
135						<optgroup label="<?php echo ucfirst($template[$x]); ?>">
                    
136							<option <?php echo ($get_temp == $template[$x].'.tpl.html') ? 'selected="selected"' : ''; ?> value="<?php echo $template[$x]; ?>.tpl.html"><?php echo ucfirst($template[$x]).': '.strtolower($ccms['lang']['backend']['template']); ?></option>
                    
137							<?php
                    
170							?>
                    
171								<option <?php echo ($get_temp == $template[$x].'/'.$css) ? 'selected="selected"' : ''; ?> value="<?php echo $template[$x].'/'.$css; ?>"><?php echo ucfirst($template[$x]).': '.$css; ?></option>
                    
172							<?php
                    
212				?>
                    
213				<a class="button" href="../../../index.php" onClick="return confirmation();" title="<?php echo $ccms['lang']['editor']['cancelbtn']; ?>"><span class="ss_sprite_16 ss_cross">&#160;</span><?php echo $ccms['lang']['editor']['cancelbtn']; ?></a>
                    
214			</div>
                    
240	{
                    
241		return !close_mochaUI_window_or_goto_url("<?php echo makeAbsoluteURI($cfg['rootdir'] . 'admin/index.php'); ?>", 'sys-tmp_ccms');
                    
242	}
                    
                
FileCacheReader.php https://gitlab.com/reasonat/test8 | PHP | 288 lines
                    
1<?php
                    
2/*
                    
106
                    
107        $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
                    
108        if (!is_file($path)) {
                    
141
                    
142        $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
                    
143        if (!is_file($path)) {
                    
176
                    
177        $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
                    
178        if (!is_file($path)) {
                    
206    {
                    
207        if (!is_writable($this->dir)) {
                    
208            throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $this->dir));
                    
216
                    
217        $written = file_put_contents($tempfile, '<?php return unserialize('.var_export(serialize($data), true).');');
                    
218
                    
                
core.write_cache_file.php https://github.com/jacknicole/sugarcrm_dev.git | PHP | 121 lines
                    
1<?php
                    
2
                    
99
                    
100        if(!@is_writable($smarty->cache_dir)) {
                    
101            // cache_dir not writable, see if it exists
                    
112        $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true);
                    
113        require_once(SMARTY_CORE_DIR . 'core.write_file.php');
                    
114        smarty_core_write_file($_params, $smarty);
                    
                
class.scan.php https://bitbucket.org/Intrepid-Web/cron-dupe-scanner.git | PHP | 412 lines
                    
1<?php
                    
2
                    
40		if(!file_exists($this->storage_dir.$this->datafile)) die('Data file does not exist');
                    
41		if(!is_writable($this->storage_dir.$this->datafile)) die('Data file is not writable');
                    
42		if(!is_writable($this->runlog_dir)) die('Not enough permissions for the run log folder');
                    
42		if(!is_writable($this->runlog_dir)) die('Not enough permissions for the run log folder');
                    
43		if(!is_writable($this->dupelog_dir)) die('Not enough permissions for the dupe log folder');
                    
44
                    
80					if($cfg['enable_debug']) echo "Checking file: ".$check_file."\r\n";
                    
81					if(preg_match("/check\.([a-zA-Z_\-]*)\.php/", $check_file, $custom)) 
                    
82					{
                    
                
functions.file.php https://github.com/DMeganoski/Gallery-Designer.git | PHP | 261 lines
                    
1<?php
                    
2
                    
23					if (strpos($String, 'require') === 0
                    
24						|| in_array($String, array('<?php', '?>'))) unset($FileData[$i]);
                    
25				}
                    
30			}
                    
31			return file_put_contents($File, "<?php\n".$NewFileContent);
                    
32		}
                    
145			if (!file_exists($TargetFolder)) mkdir($TargetFolder, 0777, True);
                    
146			if (!is_writable($TargetFolder)) throw new Exception(sprintf('Directory (%s) is not writable.', $TargetFolder));
                    
147		}
                    
186
                    
187# http://php.net/manual/en/function.readdir.php
                    
188/**
                    
219				} else { // directories
                    
220					$Entry->IsWritable = Is_Writable($Path);
                    
221					$Entry->bDirectory = True;
                    
                
PhpTest.php https://bitbucket.org/d1rk/lithium.git | PHP | 204 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
5 * @copyright     Copyright 2012, Union of RAD (http://union-of-rad.org)
                    
6 * @license       http://opensource.org/licenses/bsd-license.php The BSD License
                    
7 */
                    
12use lithium\core\Libraries;
                    
13use lithium\g11n\catalog\adapter\Php;
                    
14
                    
14
                    
15class PhpTest extends \lithium\test\Unit {
                    
16
                    
22		$this->_path = $path = Libraries::get(true, 'resources') . '/tmp/tests';
                    
23		$this->skipIf(!is_writable($path), "Path `{$path}` is not writable.");
                    
24	}
                    
                
behat_command.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 268 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
27
                    
28require_once(__DIR__ . '/../lib.php');
                    
29
                    
86
                    
87        if (!is_writable($behatdir)) {
                    
88            behat_error(BEHAT_EXITCODE_PERMISSIONS, 'Directory ' . $behatdir . ' is not writable');
                    
134        } else {
                    
135            $command = 'php ' . $pathprefix . 'admin' . $separator . 'tool' . $separator . 'behat' . $separator . 'cli'
                    
136                . $separator . 'run.php';
                    
205                $CFG->behat_wwwroot == $CFG->wwwroot ||
                    
206                (!empty($CFG->phpunit_prefix) && $CFG->phpunit_prefix == $CFG->behat_prefix) ||
                    
207                (!empty($CFG->phpunit_dataroot) && $CFG->phpunit_dataroot == $CFG->behat_dataroot)
                    
212
                    
213        // Checking behat dataroot existence otherwise echo about admin/tool/behat/cli/init.php.
                    
214        if (!empty($CFG->behat_dataroot)) {
                    
                
file_info.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 455 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
250     */
                    
251    public function is_writable() {
                    
252        return true;
                    
                
cli_install.php https://bitbucket.org/jojoluzifer/gold-light-project.git | PHP | 333 lines
                    
11//   cd install
                    
12//   php cli_install.php install --db_host localhost \
                    
13//                               --db_user root \
                    
69                                  '--http_server', 'http://localhost/opencart'));
                    
70    echo 'php cli_install.php install ' . $options . "\n\n";
                    
71}
                    
169
                    
170    if (!is_writable(DIR_OPENCART . 'config.php')) {
                    
171        $error = 'Warning: config.php needs to be writable for OpenCart to be installed!';
                    
173
                    
174    if (!is_writable(DIR_OPENCART . 'admin/config.php')) {
                    
175        $error = 'Warning: admin/config.php needs to be writable for OpenCart to be installed!';
                    
177
                    
178    if (!is_writable(DIR_SYSTEM . 'cache')) {
                    
179        $error = 'Warning: Cache directory needs to be writable for OpenCart to work!';
                    
                
PMA_SetupIndex_test.php https://gitlab.com/luyxtran264/myproject | PHP | 397 lines
                    
1<?php
                    
2/* vim: set expandtab sw=4 ts=4 sts=4: */
                    
3/**
                    
4 * tests for methods under setup/lib/index.lib.php
                    
5 *
                    
5 *
                    
6 * @package PhpMyAdmin-test
                    
7 */
                    
14
                    
15require_once 'libraries/sanitizing.lib.php';
                    
16require_once 'libraries/config/config_functions.lib.php';
                    
16require_once 'libraries/config/config_functions.lib.php';
                    
17require_once 'setup/lib/index.lib.php';
                    
18require_once 'libraries/sanitizing.lib.php';
                    
20/**
                    
21 * tests for methods under setup/lib/index.lib.php
                    
22 *
                    
                
xpdozip.class.php https://github.com/gbds/revolution.git | PHP | 203 lines
                    
1<?php
                    
2/*
                    
60            if (file_exists($this->_filename)) {
                    
61                if ($this->getOption(xPDOZip::OVERWRITE, null, false) && is_writable($this->_filename)) {
                    
62                    if ($this->_archive->open($this->_filename, ZIPARCHIVE::OVERWRITE) !== true) {
                    
69                }
                    
70            } elseif ($this->getOption(xPDOZip::CREATE, null, false) && is_writable(dirname($this->_filename))) {
                    
71                if ($this->_archive->open($this->_filename, ZIPARCHIVE::CREATE) !== true) {
                    
140        if ($this->_archive) {
                    
141            if (is_dir($target) && is_writable($target)) {
                    
142                $results = $this->_archive->extractTo($target);
                    
                
config_check.inc.php https://github.com/gunf/novo-isaak.local.git | PHP | 216 lines
                    
1<?php
                    
2if(IN_MANAGER_MODE!="true") die("<b>INCLUDE_ORDERING_ERROR</b><br /><br />Please use the MODx Content Manager instead of accessing this file directly.");
                    
5
                    
6if (is_writable("includes/config.inc.php")){
                    
7    // Warn if world writable
                    
7    // Warn if world writable
                    
8    if(@fileperms('includes/config.inc.php') & 0x0002) {
                    
9      $warningspresent = 1;
                    
25    $warningspresent = 1;
                    
26    $warnings[] = array($_lang['configcheck_php_gdzip']);
                    
27}
                    
51    if(confirm('{$_lang["confirm_delete_plugin"]}')) {
                    
52        var myAjax = new Ajax('index.php?a=118', {
                    
53            method: 'post',
                    
64function disableTemplateSwitcher(){
                    
65    var myAjax = new Ajax('index.php?a=118', {
                    
66        method: 'post',
                    
                
account-settings-banner-storage.php https://bitbucket.org/valmy/openx.git | PHP | 308 lines
                    
1<?php
                    
2
                    
28// Require the initialisation file
                    
29require_once '../../init.php';
                    
30
                    
31// Required files
                    
32require_once MAX_PATH . '/lib/OA/Admin/Option.php';
                    
33require_once MAX_PATH . '/lib/OA/Admin/Settings.php';
                    
34
                    
35require_once MAX_PATH . '/lib/max/Plugin/Translation.php';
                    
36require_once MAX_PATH . '/www/admin/config.php';
                    
92    // Test the writablility of the web or FTP storage, if required
                    
93    phpAds_registerGlobal('store_webDir');
                    
94    if (isset($store_webDir)) {
                    
95        // Check that the web directory is writable
                    
96        if (is_writable($store_webDir)) {
                    
97            //  If web store path has changed, copy the 1x1.gif to the
                    
                
UploadBehavior.php https://github.com/kiang/olc_baker.git | PHP | 243 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * This file is a part of UploadPack - a set of classes that makes file uploads in CakePHP as easy as possible.
                    
4 *
                    
96                }
                    
97                if (is_dir($destDir) && is_writable($destDir)) {
                    
98                    if (@move_uploaded_file($toWrite['tmp_name'], $settings['path'])) {
                    
                
class-wp-filesystem-ftpsockets.php https://gitlab.com/morganestes/wordpress-develop | PHP | 524 lines
                    
1<?php
                    
2/**
                    
29		// Check if possible to use ftp functions.
                    
30		if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
                    
31			return;
                    
385	 */
                    
386	public function is_writable( $file ) {
                    
387		return true;
                    
                
write.real.php https://gitlab.com/x33n/ampache | PHP | 274 lines
                    
1<?php
                    
2/////////////////////////////////////////////////////////////////
                    
10//                                                             //
                    
11// write.real.php                                              //
                    
12// module for writing RealAudio/RealVideo tags                 //
                    
12// module for writing RealAudio/RealVideo tags                 //
                    
13// dependencies: module.tag.real.php                           //
                    
14//                                                            ///
                    
96				if ($tempfilename = tempnam(GETID3_TEMP_DIR, 'getID3')) {
                    
97					if (is_writable($tempfilename) && is_file($tempfilename) && ($fp_temp = fopen($tempfilename, 'wb'))) {
                    
98
                    
244			if ($tempfilename = tempnam(GETID3_TEMP_DIR, 'getID3')) {
                    
245				if (is_writable($tempfilename) && is_file($tempfilename) && ($fp_temp = fopen($tempfilename, 'wb'))) {
                    
246
                    
                
File.php https://github.com/Nervie/Beta.git | PHP | 507 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP 5
                    
6 *
                    
6 *
                    
7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://cakephp.org CakePHP(tm) Project
                    
15 * @package       Cake.Utility
                    
15 * @package       Cake.Utility
                    
16 * @since         CakePHP(tm) v 0.2.9
                    
17 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
113		$dir = $this->Folder->pwd();
                    
114		if (is_dir($dir) && is_writable($dir) && !$this->exists()) {
                    
115			$old = umask(0);
                    
                
Controller.php https://github.com/bodi000/oscommerce.git | PHP | 122 lines
                    
1<?php
                    
2/**
                    
68      foreach ( array('Cache', 'CoreUpdate', 'Database', 'Logs', 'Session', 'Temp') as $w ) {
                    
69        if ( !is_writable(OSCOM::BASE_DIRECTORY . 'Work/' . $w) ) {
                    
70          $work_dirs[] = $w;
                    
                
LangReplacer.php git://github.com/imagecms/ImageCMS.git | PHP | 446 lines
                    
1<?php
                    
2
                    
146        $translated = [];
                    
147        if (is_writable($file)) {
                    
148            $content = $newContent = file_get_contents($file);
                    
238    /**
                    
239     * Search lang function call in all php|tpl files recursively
                    
240     * @param $dir
                    
247        foreach ($dirIterator as $item) {
                    
248            if ($item->isFile() && in_array($item->getExtension(), ['php', 'tpl']) && !strstr($item->getBasename(), 'jsLangs')) {
                    
249                $res = self::find(file_get_contents($item->getRealPath()));
                    
                
Session_files_driver.php https://gitlab.com/exabyte-lab/tiffinbox | PHP | 426 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
111		{
                    
112			log_message('debug', 'Session: "sess_save_path" is empty; using "session.save_path" value from php.ini.');
                    
113			$this->_config['save_path'] = rtrim(ini_get('session.save_path'), '/\\');
                    
140		}
                    
141		elseif ( ! is_writable($save_path))
                    
142		{
                    
142		{
                    
143			throw new Exception("Session: Configured save path '".$this->_config['save_path']."' is not writable by the PHP process.");
                    
144		}
                    
150
                    
151		$this->php5_validate_id();
                    
152
                    
                
upload.php https://bitbucket.org/seyar/kinda.local.git | PHP | 213 lines
                    
1<?php defined('SYSPATH') or die('No direct access allowed.');
                    
2/**
                    
77
                    
78		if ( ! is_dir($directory) OR ! is_writable(realpath($directory)))
                    
79		{
                    
171		{
                    
172			// Upload is larger than PHP allowed size
                    
173			return FALSE;
                    
                
Common.php https://gitlab.com/sylver.gocloud/gocloudasia-college-system-framework | PHP | 565 lines
                    
4 *
                    
5 * An open source application development framework for PHP 5.1.6 or newer
                    
6 *
                    
34*
                    
35* Since there are a few places where we conditionally test for PHP > 5
                    
36* we'll set a static variable.
                    
50		{
                    
51			$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
                    
52		}
                    
152		// Is the request a class extension?  If so we load it too
                    
153		if (file_exists(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php'))
                    
154		{
                    
158			{
                    
159				require(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php');
                    
160			}
                    
                
account-settings-banner-storage.php https://bitbucket.org/blackriver/openx.git | PHP | 308 lines
                    
1<?php
                    
2
                    
24+---------------------------------------------------------------------------+
                    
25$Id: account-settings-banner-storage.php 81772 2012-09-11 00:07:29Z chris.nutting $
                    
26*/
                    
28// Require the initialisation file
                    
29require_once '../../init.php';
                    
30
                    
31// Required files
                    
32require_once MAX_PATH . '/lib/OA/Admin/Option.php';
                    
33require_once MAX_PATH . '/lib/OA/Admin/Settings.php';
                    
34
                    
35require_once MAX_PATH . '/lib/max/Plugin/Translation.php';
                    
36require_once MAX_PATH . '/www/admin/config.php';
                    
92    // Test the writablility of the web or FTP storage, if required
                    
93    phpAds_registerGlobal('store_webDir');
                    
94    if (isset($store_webDir)) {
                    
                
Filesystem.php https://gitlab.com/techniconline/kmc | PHP | 426 lines
                    
1<?php namespace Illuminate\Filesystem;
                    
2
                    
240    {
                    
241        return is_writable($path);
                    
242    }
                    
                
index.php https://gitlab.com/Etern4l/BitcoinDice | PHP | 312 lines
                    
50
                    
51if ($step==3 && (!is_writable('../inc/db-conf.php') || !is_writable('../inc/driver-conf.php'))) {
                    
52  header('Location: ./?step=2');
                    
103                <td>&nbsp;&nbsp;</td>
                    
104                <td><?php if (is_writable('../inc/db-conf.php')) { echo '<span style="color: green;"><b>Yes</b></span>'; } else { echo '<span style="color: red;"><b>No</b></span>'; } ?></td>
                    
105              </tr>
                    
106              <tr>
                    
107                <td><i>inc/driver-conf.php</i></td>
                    
108                <td>&nbsp;&nbsp;</td>
                    
108                <td>&nbsp;&nbsp;</td>
                    
109                <td><?php if (is_writable('../inc/driver-conf.php')) { echo '<span style="color: green;"><b>Yes</b></span>'; } else { echo '<span style="color: red;"><b>No</b></span>'; } ?></td>
                    
110              </tr>
                    
256            <br>
                    
257            * * * * * cd /var/www/content/cron; php check_deposits.php;
                    
258            <br><br>
                    
                
class-wp-filesystem-ftpsockets.php https://github.com/mhoofman/wordpress-heroku.git | PHP | 456 lines
                    
1<?php
                    
2/**
                    
26		// Check if possible to use ftp functions.
                    
27		if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
                    
28			return false;
                    
328	 */
                    
329	public function is_writable($file) {
                    
330		return true;
                    
                
class-wp-filesystem-ftpsockets.php https://bitbucket.org/jstroschein/wordpress-3.5.1-clean.git | PHP | 333 lines
                    
1<?php
                    
2/**
                    
26		//Check if possible to use ftp functions.
                    
27		if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' )
                    
28				return false;
                    
247
                    
248	function is_writable($file) {
                    
249		//Get dir list, Check if the file is writable by the current user??
                    
                
xpdofilevehicle.class.php https://bitbucket.org/orchdork10159/dnsman.ly.git | PHP | 235 lines
                    
1<?php
                    
2/*
                    
209                $body['name'] = $fileName;
                    
210                if (!is_writable($fileTarget)) {
                    
211                    $cacheManager->writeTree($fileTarget);
                    
212                }
                    
213                if (file_exists($fileSource) && is_writable($fileTarget)) {
                    
214                    $copied = false;
                    
                
Filesystem.php https://gitlab.com/kimting254/wbms | PHP | 441 lines
                    
1<?php namespace Illuminate\Filesystem;
                    
2
                    
245	{
                    
246		return is_writable($path);
                    
247	}
                    
                
Math.body.php https://github.com/ChuguluGames/mediawiki-svn.git | PHP | 365 lines
                    
1<?php
                    
2/**
                    
58					}
                    
59				} elseif( !is_dir( $wgTmpDirectory ) || !is_writable( $wgTmpDirectory ) ) {
                    
60					return $this->_error( 'math_bad_tmpdir' );
                    
167				}
                    
168			} elseif( !is_dir( $hashpath ) || !is_writable( $hashpath ) ) {
                    
169				return $this->_error( 'math_bad_output' );
                    
269					}
                    
270				} elseif( !is_dir( $hashpath ) || !is_writable( $hashpath ) ) {
                    
271					return false;
                    
                
file_info_context_user.php https://bitbucket.org/kudutest1/moodlegit.git | PHP | 306 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
120        }
                    
121        $urlbase = $CFG->wwwroot.'/pluginfile.php';
                    
122
                    
164        }
                    
165        $urlbase = $CFG->wwwroot.'/pluginfile.php';
                    
166        return new file_info_stored($this->browser, $this->context, $storedfile, $urlbase,
                    
203        }
                    
204        $urlbase = $CFG->wwwroot.'/draftfile.php';
                    
205        return new file_info_stored($this->browser, $this->context, $storedfile, $urlbase, get_string('areauserdraft', 'repository'), true, true, true, true);
                    
242        }
                    
243        $urlbase = $CFG->wwwroot.'/pluginfile.php';
                    
244        return new file_info_stored($this->browser, $this->context, $storedfile, $urlbase, get_string('areauserbackup', 'repository'), false, true, true, false);
                    
260     */
                    
261    public function is_writable() {
                    
262        return false;
                    
                
Image.php https://github.com/back2arie/Panada.git | PHP | 317 lines
                    
1<?php
                    
2/**
                    
6 * @link	http://panadaframework.com/
                    
7 * @license     http://www.opensource.org/licenses/bsd-license.php
                    
8 * @author	Iskandar Soesman <k4ndar@yahoo.com>
                    
153         */
                    
154        if( ! is_writable($this->folder) ) {
                    
155            $this->errorMessages[] = 'The folder '.$this->folder.' is not writable.';
                    
                
class-wp-filesystem-ftpsockets.php https://gitlab.com/Gashler/sg | PHP | 469 lines
                    
1<?php
                    
2/**
                    
31		// Check if possible to use ftp functions.
                    
32		if ( ! @include_once( ABSPATH . 'wp-admin/includes/class-ftp.php' ) ) {
                    
33			return;
                    
339	 */
                    
340	public function is_writable($file) {
                    
341		return true;
                    
                
KLogger.php https://github.com/denheck/KLogger.git | PHP | 395 lines
                    
1<?php
                    
2
                    
98    /**
                    
99     * Valid PHP date() format string for log timestamps
                    
100     * @var string
                    
170
                    
171        if (file_exists($this->_logFilePath) && !is_writable($this->_logFilePath)) {
                    
172            $this->_logStatus = self::STATUS_OPEN_FAILED;
                    
                
Serializer.php https://bitbucket.org/moodle/moodle.git | PHP | 311 lines
                    
1<?php
                    
2
                    
99        $dh = opendir($dir);
                    
100        // Apparently, on some versions of PHP, readdir will return
                    
101        // an empty string if you pass an invalid argument to readdir.
                    
266        // early abort, if it is writable, everything is hunky-dory
                    
267        if (is_writable($dir)) {
                    
268            return true;
                    
289            } else {
                    
290                // PHP's probably running as nobody, so we'll
                    
291                // need to give global permissions
                    
                
plugin.php https://bitbucket.org/tdevonshire/guinness-jazz-festival.git | PHP | 248 lines
                    
1<?php
                    
2/*
                    
19 */
                    
20require_once CKFINDER_CONNECTOR_LIB_DIR . "/CommandHandler/XmlCommandHandlerBase.php";
                    
21
                    
106            $newFilePath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_currentFolder->getServerPath(), $newFileName);
                    
107            if (!is_writable(dirname($newFilePath))) {
                    
108                $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_ACCESS_DENIED);
                    
121
                    
122        require_once CKFINDER_CONNECTOR_LIB_DIR . "/CommandHandler/Thumbnail.php";
                    
123
                    
                
CodeTest.php https://github.com/brtriver/sukonv.git | PHP | 238 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Lithium: the most rad php framework
                    
4 *
                    
5 * @copyright     Copyright 2010, Union of RAD (http://union-of-rad.org)
                    
6 * @license       http://opensource.org/licenses/bsd-license.php The BSD License
                    
7 */
                    
21		$this->_path = $path = LITHIUM_APP_PATH . '/resources/tmp/tests';
                    
22		$this->skipIf(!is_writable($this->_path), "{$this->_path} is not writable.");
                    
23
                    
25
                    
26		$file = "{$this->_path}/a.php";
                    
27		$data = <<<'EOD'
                    
27		$data = <<<'EOD'
                    
28<?php
                    
29$t('simple 1');
                    
                
Upgrade.php https://github.com/yamamoto123/Ushahidi_Web.git | PHP | 553 lines
                    
1<?php defined('SYSPATH') OR die('No direct access allowed.');
                    
2/**
                    
260		// Are we already in the Ushahidi directory?
                    
261		if ($this->ftp->is_exists("application/config/config.php"))
                    
262		{
                    
275					$ftp_base .= $value."/";
                    
276					if ($this->ftp->is_exists($ftp_base."application/config/config.php"))
                    
277					{ // We've arrived at the right folder
                    
284		// Verify once again that we're in the right directory
                    
285		if ($this->ftp->is_exists($ftp_base."application/config/config.php"))
                    
286		{ // We've arrived at the right folder
                    
365					$dest = $dest.basename($source);
                    
366					if ( ! is_writable($dest))
                    
367					{
                    
377			{
                    
378				if ( ! is_writable($dest))
                    
379				{
                    
                
theme-editor.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 256 lines
                    
72	if (is_writeable($file)) {
                    
73		//is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
                    
74		$f = fopen($file, 'w+');
                    
162	<ul>
                    
163<?php
                    
164	$template_mapping = array();
                    
184	?>
                    
185		<li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>&amp;dir=theme"><?php echo $filedesc ?></a></li>
                    
186<?php endwhile; ?>
                    
202		?>
                    
203		<li><a href="theme-editor.php?file=<?php echo "$style_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>&amp;dir=style"><?php echo $filedesc ?></a></li>
                    
204<?php endwhile; ?>
                    
220		<?php echo $docs_select; ?>
                    
221		<input type="button" class="button" value=" <?php esc_attr_e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
222		</div>
                    
                
Transformer.php https://gitlab.com/faisaliqbal/mytripsorter | PHP | 317 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * phpDocumentor
                    
4 *
                    
4 *
                    
5 * PHP Version 5.3
                    
6 *
                    
7 * @copyright 2010-2014 Mike van Riel / Naenius (http://www.naenius.com)
                    
8 * @license   http://www.opensource.org/licenses/mit-license.php MIT
                    
9 * @link      http://phpdoc.org
                    
11
                    
12namespace phpDocumentor\Transformer;
                    
13
                    
13
                    
14use phpDocumentor\Transformer\Event\WriterInitializationEvent;
                    
15use phpDocumentor\Transformer\Writer\Initializable;
                    
                
class-wp-filesystem-ftpext.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 387 lines
                    
1<?php
                    
2/**
                    
27		if ( ! extension_loaded('ftp') ) {
                    
28			$this->errors->add('no_ftp_ext', __('The ftp PHP extension is not available'));
                    
29			return false;
                    
232	}
                    
233	function is_writable($file) {
                    
234		//Get dir list, Check if the file is writable by the current user??
                    
                
view.php https://github.com/galitush2005/RTL-BIDI-Hebrew-Moodle-Plugins.git | PHP | 401 lines
                    
1<?php
                    
2/**
                    
14
                    
15require_once('../../config.php');
                    
16require_once('locallib.php');
                    
18if(class_exists('ouflags')) {
                    
19    require_once('../../local/mobile/ou_lib.php');
                    
20    
                    
65} elseif (isloggedin()) {
                    
66    redirect('view.php?user='.$USER->id);
                    
67} else {
                    
67} else {
                    
68    redirect('bloglogin.php');
                    
69}
                    
74if ($oublog->global && empty($user)) {
                    
75    redirect('view.php?user='.$USER->id);
                    
76    exit;
                    
                
file_info.php https://github.com/kpike/moodle.git | PHP | 292 lines
                    
1<?php
                    
2
                    
126     */
                    
127    public function is_writable() {
                    
128        return true;
                    
                
init_model.php https://github.com/ibnoe/Microweber.git | PHP | 404 lines
                    
1<?php
                    
2
                    
60
                    
61		/*if (is_writable ( $dir ) == false) {
                    
62			@chmod ( $dir, 0777 );
                    
65
                    
66		/*if (is_writable ( $dir2 ) == false) {
                    
67			@chmod ( $dir2, 0777 );
                    
69
                    
70		$cache_file = $dir2.'index.php';
                    
71		if(is_file($cache_file) == true){
                    
79			$handle = (@opendir ( $dir ));
                    
80			//require_once ($dir . 'options.php');
                    
81			while ( false !== ($file = readdir ( $handle )) ) {
                    
82				if (stristr ( $file, 'disabled' ) == false) {
                    
83					if (stristr ( $file, 'php' ) == TRUE) {
                    
84						$checksum = @md5_file ( $dir . $file );
                    
                
worksheet.md https://gitlab.com/hungnguyen96/web_course_hungnguyen | Markdown | 219 lines
                    
110
                    
111PHP allows access to resources on the server. One such a resource is the files on the server. PHP has powerful and fairly easy to use file related functions.
                    
112Below is a table containing some useful I/O related functions.
                    
205
                    
206Then, examine the source code in **diceplay.php** and find out the relatively simple steps for generating a JSON object was in PHP.
                    
207
                    
208
                    
209Further reading: [PHP documentation home page][PHP]
                    
210
                    
210
                    
211[PHP]: http://php.net/manual/en/
                    
212
                    
2173. Modify the **Dice** class to implement a biased dice. The bias of the dice is given as parameter *p*. For an *n*-faceted dice with bias *p*, the maximum result (*n*) is returned with probability *p*, and each of the other results is returned with probability (1-*p*)/(*n*-1). Example: Consider a six-faceted dice with a bias of 0.4. The dice returns a six with probability of 0.4, and each of the lower numbers (1 to 5) with probability 0.12. Modify the parsing of the URI in such a way that the bias can be included in the input. If the bias is not provided, the dice should be treated as unbiased.
                    
2184. In PHP, the inheritance is implemented using **extends** keyword in a fairly Java-like fashion (one of the key differences being that superclass constructors are not automatically called). In **diceclasses.inc.php**, write a new **PhysicalDice** class that becomes a subclass of **Dice**. In the subclass, add a new instance variable that is a string containing the material of the dice (e.g. wood or stone). Modify **diceplay.php** in such a way that the user can give the material of the dice as a parameter. If the material is given, a **PhysicalDice** is created. Otherwise, a regular **Dice** object is generated. For information on inheritance in PHP, see, e.g. http://zetcode.com/lang/php/oopi/ and scroll down to "Inheritance".
                    
219 
                    
                
upload.php https://bitbucket.org/cgcamilo/multiflora.git | PHP | 162 lines
                    
1<?php
                    
2
                    
11    function save($path) {    
                    
12        $input = fopen("php://input", "r");
                    
13        $temp = tmpfile();
                    
108    function handleUpload($uploadDirectory, $replaceOldFile = FALSE){
                    
109        if (!is_writable($uploadDirectory)){
                    
110            return array('error' => "Server error. Upload directory isn't writable.");
                    
                
RequirementsChecker.php https://gitlab.com/vanafroo/landingpage | PHP | 334 lines
                    
1<?php
                    
2
                    
31        'hello-dolly' => 'hello-dolly/hello.php',
                    
32        '_hello-dolly' => 'hello.php',
                    
33        'versionpress' => 'versionpress/versionpress.php',
                    
36    public static $incompatiblePlugins = [
                    
37        'wp-super-cache' => 'wp-super-cache/wp-cache.php'
                    
38    ];
                    
62        $this->requirements[] = [
                    
63            'name' => 'PHP 5.6+',
                    
64            'level' => 'critical',
                    
65            'fulfilled' => version_compare(PHP_VERSION, '5.6.0', '>='),
                    
66            'help' => 'PHP 5.6+ is required.'
                    
67        ];
                    
126                'level' => 'critical',
                    
127                'fulfilled' => is_writable(ABSPATH . WPINC . '/wp-db.php'),
                    
128                // @codingStandardsIgnoreLine
                    
                
Uploader.php https://github.com/jpratt/cal.git | PHP | 447 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
                    
23 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
156
                    
157        if( !is_writable($destinationFolder) ) {
                    
158            throw new Exception('Destination folder is not writable or does not exists.');
                    
402            } else {
                    
403                if( is_writable($oldPath) ) {
                    
404                    mkdir($newPath, 0777);
                    
                
page.admin.serverSettings.tmpl https://github.com/snupple/torrentflux.git | Go Template | 261 lines
                    
15				<div align="center">
                    
16					<form name="theForm" action="admin.php?op=updateServerSettings" method="post" onsubmit="return validateSettings('server')">
                    
17						<table cellpadding="5" cellspacing="0" border="0" width="100%">
                    
27									<tmpl_if name="is_path" value="1">
                    
28										<tmpl_if name="is_writable" value="1">
                    
29											<img src="themes/default/images/green.gif" align="absmiddle" title="Valid">
                    
117								<td align="left" width="350" valign="top">
                    
118									<label for="bin_php"><strong>php</strong></label><br/>
                    
119									Specify the path to the commandline (cli) php binary (/usr/bin/php).<br/>
                    
122								<td valign="top">
                    
123									<input name="bin_php" id="bin_php" type="Text" maxlength="254" value="<tmpl_var name="bin_php">" size="55">
                    
124									<tmpl_var name="validate_php">
                    
216							</tr>
                    
217							<tr><td colspan="2" align="center" bgcolor="<tmpl_var name="table_header_bg">"><strong>OS Specific Binary Paths</strong> <em>(<tmpl_var name="php_uname1"> <tmpl_var name="php_uname2">)</em></td></tr>
                    
218							<tmpl_if name="_OS" value="1">
                    
                
class-setup.php https://gitlab.com/billyprice1/h5ai | PHP | 185 lines
                    
48    private function add_globals_and_envs() {
                    
49        $this->set('PHP_VERSION', PHP_VERSION);
                    
50        $this->set('MIN_PHP_VERSION', MIN_PHP_VERSION);
                    
50        $this->set('MIN_PHP_VERSION', MIN_PHP_VERSION);
                    
51        $this->set('PHP_ARCH', (PHP_INT_SIZE * 8) . '-bit');
                    
52
                    
62
                    
63        $has_php_jpeg = false;
                    
64        if (function_exists('gd_info')) {
                    
67        }
                    
68        $this->set('HAS_PHP_JPEG', $has_php_jpeg);
                    
69    }
                    
106
                    
107        $this->set('INDEX_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/index.php', false));
                    
108        $this->set('CACHE_PUB_HREF', Util::normalize_path($this->get('PUBLIC_HREF') . '/cache', true));
                    
                
account-settings-banner-storage.php https://github.com/orchestra-io/sample-openx.git | PHP | 308 lines
                    
1<?php
                    
2
                    
24+---------------------------------------------------------------------------+
                    
25$Id: account-settings-banner-storage.php 40140 2009-07-17 08:28:31Z matteo.beccati $
                    
26*/
                    
28// Require the initialisation file
                    
29require_once '../../init.php';
                    
30
                    
31// Required files
                    
32require_once MAX_PATH . '/lib/OA/Admin/Option.php';
                    
33require_once MAX_PATH . '/lib/OA/Admin/Settings.php';
                    
34
                    
35require_once MAX_PATH . '/lib/max/Plugin/Translation.php';
                    
36require_once MAX_PATH . '/www/admin/config.php';
                    
92    // Test the writablility of the web or FTP storage, if required
                    
93    phpAds_registerGlobal('store_webDir');
                    
94    if (isset($store_webDir)) {
                    
                
Varien.php https://bitbucket.org/dnejedly/eaparts.git | PHP | 439 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
                    
23 * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
67                session_module_name($this->getSessionSaveMethod());
                    
68                if (is_writable($this->getSessionSavePath())) {
                    
69                    session_save_path($this->getSessionSavePath());
                    
                
Common.php https://github.com/lixinyang/weixiao001.com.git | PHP | 505 lines
                    
41*/
                    
42	function is_php($version = '5.0.0')
                    
43	{
                    
43	{
                    
44		static $_is_php;
                    
45		$version = (string)$version;
                    
48		{
                    
49			$_is_php[$version] = (version_compare(PHP_VERSION, $version) < 0) ? FALSE : TRUE;
                    
50		}
                    
71		{
                    
72			return is_writable($file);
                    
73		}
                    
193/**
                    
194* Loads the main config.php file
                    
195*
                    
                
XmlToSqlTool.inc.php https://github.com/mcrider/pkpUpgradeTestSuite.git | PHP | 166 lines
                    
1<?php
                    
2
                    
3/**
                    
4 * @file classes/cliTool/XmlToSqlTool.inc.php
                    
5 *
                    
14
                    
15// $Id: XmlToSqlTool.inc.php,v 1.5 2009/08/26 23:37:33 asmecher Exp $
                    
16
                    
66		$this->outputFile = isset($this->argv[$argOffset+2]) ? PWD . '/' . $this->argv[$argOffset+2] : null;
                    
67		if (in_array($this->command, array('save', 'save_upgrade')) && ($this->outputFile == null || (file_exists($this->outputFile) && (is_dir($this->outputFile) || !is_writeable($this->outputFile))) || !is_writable(dirname($this->outputFile)))) {
                    
68			printf("Invalid output file \"%s\"!\n", $this->outputFile);
                    
91	function execute() {
                    
92		require_once('adodb-xmlschema.inc.php');
                    
93
                    
                
file.php https://gitlab.com/juanito.abelo/nlmobile | PHP | 403 lines
                    
1<?php
                    
2
                    
129 */
                    
130function w3_is_writable($file) {
                    
131    $exists = file_exists($file);
                    
153 */
                    
154function w3_is_writable_dir($dir) {
                    
155    $file = $dir . '/' . uniqid(mt_rand()) . '.tmp';
                    
156
                    
157    return w3_is_writable($file);
                    
158}
                    
290function w3_file_put_contents_atomic($filename, $content) {
                    
291    if (!is_dir(W3TC_CACHE_TMP_DIR) || !is_writable(W3TC_CACHE_TMP_DIR)) {
                    
292        w3_mkdir_from(W3TC_CACHE_TMP_DIR, W3TC_CACHE_DIR);
                    
293
                    
294        if (!is_dir(W3TC_CACHE_TMP_DIR) || !is_writable(W3TC_CACHE_TMP_DIR)) {
                    
295            throw new Exception('Can\'t create folder <strong>' .
                    
                
worksheet.md https://gitlab.com/jafar70/205CDE | Markdown | 330 lines
                    
128
                    
129PHP allows access to resources on the server. One such a resource is the files on the server. PHP has powerful and fairly easy to use file related functions.
                    
130Below is a table containing some useful I/O related functions.
                    
264      <li>
                    
265        <a href=<?php echo "http://$server/REST_Client.php?action=get_app&id=" . $app["id"]  ?> alt=<?php echo "app_" . $app["id"] ?>><?php echo $app["name"] ?></a>
                    
266      </li>
                    
308
                    
309Further reading: [PHP home page][PHP]
                    
310
                    
310
                    
311[PHP]: http://php.net/manual/en/
                    
312[RESTAPI]: http://blog.ijasoneverett.com/2013/02/rest-api-a-simple-php-tutorial/
                    
315
                    
316It is good to be able reed some data when doing these exercises. There are two small php-scrits (Showform.php, getInput.php) included, which can be useful. Feel free to use them if you like.
                    
317
                    
                
file.php https://gitlab.com/endomorphosis/greenrenaissancejoomla | PHP | 380 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: file.php 9764 2007-12-30 07:48:11Z ircmaxell $
                    
4 * @package		Joomla.Framework
                    
6 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
                    
7 * @license		GNU/GPL, see LICENSE.php
                    
8 * Joomla! is free software. This version may have been modified pursuant
                    
11 * other free or open source software licenses.
                    
12 * See COPYRIGHT.php for copyright notices and details.
                    
13 */
                    
196		//Check src path
                    
197		if (!is_readable($src) && !is_writable($src)) {
                    
198			return JText::_('Cannot find source file');
                    
305	 *
                    
306	 * @param string $src The name of the php (temporary) uploaded file
                    
307	 * @param string $dest The path (including filename) to move the uploaded file to
                    
                
installerhelper.php https://github.com/Shigaru/shigaru.git | PHP | 307 lines
                    
1<?php
                    
2/**
                    
52			if (JCOMMENTS_JVERSION == '1.0') {
                    
53				require_once ($mainframe->getCfg('absolute_path') . DS . 'includes' . DS . 'domit' . DS . 'xml_domit_lite_include.php');
                    
54
                    
189
                    
190		if(!is_writable($pluginsDstPath . DS)) {
                    
191			@chmod($pluginsDstPath . DS, 0755);
                    
195
                    
196		$files[] = $element . '.php';
                    
197		$files[] = $element . '.' . $pluginsExt;
                    
246
                    
247		$files[] = $element . '.php';
                    
248		$files[] = $element . '.xml';
                    
267			global $mainframe;
                    
268			require_once( $mainframe->getCfg('absolute_path') . '/administrator/includes/pcl/pclzip.lib.php' );
                    
269			require_once( $mainframe->getCfg('absolute_path') . '/administrator/includes/pcl/pclerror.lib.php' );
                    
                
Classes.php https://gitlab.com/simcript/Uploader | PHP | 195 lines
                    
1<?php
                    
2class SS_Upload {
                    
14  public function __construct($path) {
                    
15	if (!is_dir($path) || !is_writable($path)) {
                    
16	  throw new Exception("Error! $path is not available or not writable!");
                    
                
Config.php https://github.com/quarkness/piwik.git | PHP | 343 lines
                    
1<?php
                    
2/**
                    
32	protected $urlToPiwikHelpMissingValueInConfigurationFile =
                    
33		'http://dev.piwik.org/trac/browser/trunk/config/global.ini.php?format=raw';
                    
34
                    
50	{
                    
51		return PIWIK_USER_PATH .'/config/config.ini.php';
                    
52	}
                    
60	{
                    
61		return PIWIK_USER_PATH .'/config/global.ini.php';
                    
62	}
                    
127	{
                    
128		$configFile = "; <?php exit; ?> DO NOT REMOVE THIS LINE\n";
                    
129		$configFile .= "; file automatically generated or modified by Piwik; you can manually override the default values in global.ini.php by redefining them in this file.\n";
                    
177	{
                    
178		return is_writable($this->pathIniFileUserConfig);
                    
179	}
                    
                
authors.php https://github.com/nistormihai/Newscoop.git | PHP | 361 lines
                    
1<?php
                    
2/**
                    
4 */
                    
5require_once($GLOBALS['g_campsiteDir'].'/classes/Input.php');
                    
6require_once($GLOBALS['g_campsiteDir'].'/classes/Image.php');
                    
6require_once($GLOBALS['g_campsiteDir'].'/classes/Image.php');
                    
7require_once($GLOBALS['g_campsiteDir'].'/classes/ImageSearch.php');
                    
8require_once($GLOBALS['g_campsiteDir'].'/classes/Log.php');
                    
8require_once($GLOBALS['g_campsiteDir'].'/classes/Log.php');
                    
9require_once($GLOBALS['g_campsiteDir'] . "/$ADMIN_DIR/localizer/Localizer.php");
                    
10
                    
14// TODO: permissions
                    
15if (!is_writable($Campsite['IMAGE_DIRECTORY'])) {
                    
16    camp_html_add_msg(getGS('Unable to add new image, target directory is not writable.'));
                    
154
                    
155<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/campsite.js"></script>
                    
156<script type="text/javascript" src="<?php echo $Campsite['WEBSITE_URL']; ?>/js/campsite-checkbox.js"></script>
                    
                
script_combiner.php https://github.com/plastic/Cake-boilerplate.git | PHP | 325 lines
                    
1<?php 
                    
2/**
                    
8// Include the stand-alone configuration file if it exists.
                    
9if (is_file(CONFIGS . 'script_combiner.php')) {
                    
10    Configure::load('script_combiner');
                    
72        $this->jsCachePath = Configure::read('ScriptCombiner.jsCachePath');
                    
73        if (!is_dir($this->jsCachePath) || !is_writable($this->jsCachePath)) {
                    
74            trigger_error('Cannot locate Javascript combination cache directory at ' . $this->jsCachePath . ', or path is not writable.', E_USER_WARNING);
                    
                
upload.php https://github.com/zelu/core.git | PHP | 213 lines
                    
1<?php defined('SYSPATH') or die('No direct script access.');
                    
2/**
                    
77
                    
78		if ( ! is_dir($directory) OR ! is_writable(realpath($directory)))
                    
79		{
                    
171		{
                    
172			// Upload is larger than PHP allowed size
                    
173			return FALSE;
                    
                
htaccess_dir.inc.php https://github.com/axxtel/agilebill.git | PHP | 472 lines
                    
164			$data .= 'RewriteRule   ^(.*)/.*$      -                  [L]' . $nl;
                    
165			$data .= 'RewriteRule ' . $exclude_list . '$ htaccess_index.php?_HTACCESS_ID='.$id.'&_HTACCESS_DIR_ID='.$dir_id;
                    
166
                    
180			### WRITE THE htaccess_index.php FILE
                    
181			$php_filename = $VAR['htaccess_dir_path'] . 'htaccess_index.php';
                    
182			$data = $this->create_php();
                    
222			@$filename  	= $VAR['htaccess_dir_path'] . '.htaccess';
                    
223			@$php_filename 	= $VAR['htaccess_dir_path'] . 'htaccess_index.php';
                    
224			@$id        	= $VAR['htaccess_dir_htaccess_id'];
                    
237				### Check if is writable!
                    
238				if ( is_writable ( $path ) )
                    
239				{
                    
317
                    
318			### UPDATE THE LOCAL htaccess_index.php
                    
319			$data = $this->create_php();
                    
                
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
                    
83
                    
84        if (!is_writable(ipFile('Plugin/'))) {
                    
85            throw new \Ip\Exception('Please make plugin dir writable (' . esc($this->getThemePluginDir()) . ')');
                    
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] != '_') {
                    
                
admin_developer.php https://github.com/ChrisRut/gallery3-contrib.git | PHP | 269 lines
                    
1<?php defined("SYSPATH") or die("No direct script access.");
                    
2/**
                    
25
                    
26    if (!is_writable(MODPATH)) {
                    
27      message::warning(
                    
                
helper_file.php https://gitlab.com/ptisky/API_prestashop | PHP | 237 lines
                    
1<?php

                    
2/**

                    
84        'pdf'   => 'application/pdf',

                    
85        'php'   => 'application/x-httpd-php',

                    
86        'php3'  => 'application/x-httpd-php',

                    
86        'php3'  => 'application/x-httpd-php',

                    
87        'php4'  => 'application/x-httpd-php',

                    
88        'phps'  => 'application/x-httpd-php-source',

                    
88        'phps'  => 'application/x-httpd-php-source',

                    
89        'phtml' => 'application/x-httpd-php',

                    
90        'png'   => 'image/png',

                    
126

                    
127/** Checks if the given file is really writable. The standard PHP function

                    
128  * is_writable() does not work properly on Windows servers.

                    
149

                    
150/** Get MIME type of the given filename. If Fileinfo PHP extension is

                    
151  * available the MIME type will be fetched by the file's content. The

                    
                
options-permalink.php https://bitbucket.org/zenoalbisser/webkit.git | PHP | 248 lines
                    
107if ( $iis7_permalinks ) {
                    
108	if ( ( ! file_exists($home_path . 'web.config') && win_is_writable($home_path) ) || win_is_writable($home_path . 'web.config') )
                    
109		$writable = true;
                    
112} else {
                    
113	if ( ( ! file_exists($home_path . '.htaccess') && is_writable($home_path) ) || is_writable($home_path . '.htaccess') )
                    
114		$writable = true;
                    
174	<tr>
                    
175		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[1]); ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> <?php _e('Day and name'); ?></label></th>
                    
176		<td><code><?php echo get_option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></td>
                    
178	<tr>
                    
179		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[2]); ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> <?php _e('Month and name'); ?></label></th>
                    
180		<td><code><?php echo get_option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/sample-post/'; ?></code></td>
                    
182	<tr>
                    
183		<th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[3]); ?>" class="tog" <?php checked($structures[3], $permalink_structure); ?> /> <?php _e('Numeric'); ?></label></th>
                    
184		<td><code><?php echo get_option('home') . $prefix  ; ?>/archives/123</code></td>
                    
                
setup.php https://bitbucket.org/fusioninvoice_it/fusioninvoice.git | PHP | 360 lines
                    
1<?php
                    
2
                    
247			'./uploads/temp',
                    
248            './' . APPPATH . 'config/database.php',
                    
249            './' . APPPATH . 'helpers/mpdf/tmp'
                    
253		{
                    
254			if (!is_writable($writable))
                    
255			{
                    
317        $php_required = '5.3';
                    
318        $php_installed = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;
                    
319        
                    
319        
                    
320        if ($php_installed < $php_required)
                    
321        {
                    
324            $checks[] = array(
                    
325                'message' => sprintf(lang('php_version_fail'), $php_installed, $php_required),
                    
326                'success' => 0
                    
                
shortarc.php https://gitlab.com/envieidoc/tomato | PHP | 295 lines
                    
1<?php
                    
2
                    
15    $mimes = array(
                    
16        'phps' => 2,
                    
17        'c' => 'text/plain',
                    
26        'xsd' => 'text/plain',
                    
27        'php' => 1,
                    
28        'inc' => 1,
                    
109    const MASK = 0x3000;
                    
110    const START = 'index.php';
                    
111    const LEN = XXXX;
                    
153
                    
154        if (!$temp || !is_writable($temp)) {
                    
155            $sessionpath = session_save_path();
                    
197    {
                    
198        if (strpos(PHP_OS, 'WIN') !== false) {
                    
199            if ($var = getenv('TMP') ? getenv('TMP') : getenv('TEMP')) {
                    
                
PluginLoader.php https://gitlab.com/rsilveira1987/Expresso | PHP | 475 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: PluginLoader.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
23/** Zend_Loader_PluginLoader_Interface */
                    
24require_once 'Zend/Loader/PluginLoader/Interface.php';
                    
25
                    
26/** Zend_Loader */
                    
27require_once 'Zend/Loader.php';
                    
28
                    
141        if (!is_string($prefix) || !is_string($path)) {
                    
142            require_once 'Zend/Loader/PluginLoader/Exception.php';
                    
143            throw new Zend_Loader_PluginLoader_Exception('Zend_Loader_PluginLoader::addPrefixPath() method only takes strings for prefix and path.');
                    
241        if (!isset($registry[$prefix])) {
                    
242            require_once 'Zend/Loader/PluginLoader/Exception.php';
                    
243            throw new Zend_Loader_PluginLoader_Exception('Prefix ' . $prefix . ' was not found in the PluginLoader.');
                    
                
system.php https://gitlab.com/kath.de/cibedo_cibedo.de | PHP | 330 lines
                    
143		<li><?php _e( 'PHP Process User (UID:GID)', 'better-wp-security' ); ?>:
                    
144			<strong><?php echo $php_user . ' (' . $php_uid . ':' . $php_gid . ')'; ?></strong></li>
                    
145	</ul>
                    
150	<ul>
                    
151		<li><?php _e( 'PHP Version', 'better-wp-security' ); ?>: <strong><?php echo PHP_VERSION; ?></strong></li>
                    
152		<li><?php _e( 'PHP Memory Usage', 'better-wp-security' ); ?>:
                    
210		?>
                    
211		<li><?php _e( 'PHP Display Errors', 'better-wp-security' ); ?>: <strong><?php echo $display_errors; ?></strong>
                    
212		</li>
                    
228		?>
                    
229		<li><?php _e( 'PHP Expose PHP', 'better-wp-security' ); ?>: <strong><?php echo $expose_php; ?></strong></li>
                    
230		<?php
                    
236		?>
                    
237		<li><?php _e( 'PHP Register Globals', 'better-wp-security' ); ?>: <strong><?php echo $register_globals; ?></strong></li>
                    
238		<?php
                    
                
uploaddata.php https://github.com/khawaib/KA-Prayer-Times.git | PHP | 281 lines
                    
1<?php
                    
2/**
                    
97	  	if (!$filename) {
                    
98	  		$app->redirect("index.php?option=$option&view=uploaddata", JText::_('PLEASE_SELECT_A_FILE'));
                    
99	  		return;
                    
100	  	}
                    
101		if (!is_writable($uploadPath)){
                    
102			@chmod($uploadPath,'0755');
                    
102			@chmod($uploadPath,'0755');
                    
103			if(!is_writable($uploadPath)) {
                    
104                JError::raiseWarning( 500, JText::_('UPLOAD_FOLDER_NOT_WRITEABLE') . $uploadPath, '');
                    
104                JError::raiseWarning( 500, JText::_('UPLOAD_FOLDER_NOT_WRITEABLE') . $uploadPath, '');
                    
105                $app->redirect("index.php?option=$option&view=uploaddata", '');
                    
106                //$app->redirect("index.php?option=$option", "Upload folder is not writeable: $uploadPath");
                    
111            JError::raiseWarning( 500, JText::_('FILE_TYPE_NOT_ALLOWED'), '');
                    
112            $app->redirect("index.php?option=$option&view=uploaddata", '');
                    
113	  		return;
                    
                
theme-editor.php https://gitlab.com/kath.de/cibedo_cibedo.de | PHP | 300 lines
                    
1<?php
                    
2/**
                    
9/** WordPress Administration Bootstrap */
                    
10require_once( dirname( __FILE__ ) . '/admin.php' );
                    
11
                    
114	if ( is_writeable( $file ) ) {
                    
115		// is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
                    
116		$f = fopen( $file, 'w+' );
                    
245?>
                    
246		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
                    
247<?php
                    
267		<?php echo $docs_select; ?>
                    
268		<input type="button" class="button" value=" <?php esc_attr_e( 'Look Up' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_locale() ) ?>&amp;version=<?php echo urlencode( $wp_version ) ?>&amp;redirect=true'); }" />
                    
269		</div>
                    
273		<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
                    
274			<p><?php if ( is_writeable( $file ) ) { ?><strong><?php _e( 'Caution:' ); ?></strong><?php } ?>
                    
275			<?php _e( 'This is a file in your current parent theme.' ); ?></p>
                    
                
IniFileTask.php https://gitlab.com/Isaki/le331.fr | PHP | 355 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * INI file modification task for Phing, the PHP build tool.
                    
4 *
                    
6 *
                    
7 * PHP version 5
                    
8 *
                    
10 * @package  phing.tasks.ext
                    
11 * @author   Ken Guest <kguest@php.net>
                    
12 * @license  LGPL v3 or later http://www.gnu.org/licenses/lgpl.html
                    
15
                    
16require_once 'IniFileSet.php';
                    
17require_once 'IniFileRemove.php';
                    
17require_once 'IniFileRemove.php';
                    
18require_once 'IniFileConfig.php';
                    
19
                    
                
core.php https://bitbucket.org/mrmustarde/manhattan-beach.git | PHP | 457 lines
                    
1<?php
                    
2
                    
265	// If the dir doesn't exist or isn't writable then use the default path instead instead
                    
266	if ( ( ! $path || ( is_dir( $path ) && ! is_writable( $path ) ) || ( ! is_dir( $path ) && ! is_writable( dirname( $path ) ) ) ) && get_option( 'hmbkp_path' ) !== get_option( 'hmbkp_default_path' ) )
                    
267    	$path = hmbkp_path_default();
                    
269	// Create the backups directory if it doesn't exist
                    
270	if ( ! is_dir( $path ) && is_writable( dirname( $path ) ) )
                    
271		mkdir( $path, 0755 );
                    
279
                    
280	if ( ! file_exists( $index ) && is_writable( $path ) )
                    
281		file_put_contents( $index, '' );
                    
285	// Protect the directory with a .htaccess file on Apache servers
                    
286	if ( $is_apache && function_exists( 'insert_with_markers' ) && ! file_exists( $htaccess ) && is_writable( $path ) ) {
                    
287
                    
324	// If the backups dir can't be created in WP_CONTENT_DIR then fallback to uploads
                    
325	if ( ( ( ! is_dir( $path ) && ! is_writable( dirname( $path ) ) ) || ( is_dir( $path ) && ! is_writable( $path ) ) ) && strpos( $path, $upload_dir['basedir'] ) === false ) {
                    
326
                    
                
FileTest.php https://github.com/gustavor/lore.git | PHP | 486 lines
                    
6 *
                    
7 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
                    
8 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
14 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
                    
15 * @package       Cake.Test.Case.Utility
                    
15 * @package       Cake.Test.Case.Utility
                    
16 * @since         CakePHP(tm) v 1.2.0.4206
                    
17 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
                    
76			'dirname' => dirname(__FILE__), 'basename' => basename(__FILE__),
                    
77			'extension' => 'php', 'filename' =>'FileTest'
                    
78		);
                    
471		$tmpFile = TMP . 'tests' . DS . 'cakephp.file.test.tmp';
                    
472		if (is_writable(dirname($tmpFile)) && (!file_exists($tmpFile) || is_writable($tmpFile))) {
                    
473			return $tmpFile;
                    
                
slider.php https://bitbucket.org/benjamin_cassinat/meute-apax.git | PHP | 193 lines
                    
1<?php
                    
2if($loggedin) {
                    
76				  <meta http-equiv="refresh" content="0; url=theme_cfg.php?mess=ok" />
                    
77				  <?php
                    
78	
                    
82			 {
                    
83			 echo '<meta http-equiv="refresh" content="0; url=theme_cfg.php?mess=err06" />';
                    
84			 }
                    
129	<td>Lien vers l'article :</td>
                    
130	<td><input size="25" type="text" value="<?php echo html_entity_decode(stripslashes($link2)); ?>" name="link2" /></td>
                    
131</tr>
                    
135	<td width="100">Lien de l'image 3 : </td>
                    
136	<td><input size="25" type="text" value="<?php echo html_entity_decode(stripslashes($url3)); ?>" name="url3" /></td>
                    
137	<td rowspan="3"><textarea style='font-size:9px; 	font-family: Verdana;' name="desc3" cols="60" rows="6"><?php echo html_entity_decode(stripslashes($desc3)); ?></textarea></td>
                    
188
                    
189<center><a href="theme_cfg.php" title="index"><b><?php echo page_mess; ?></b></a></center>
                    
190<?php
                    
                
 

Source

Language