100+ results results for 'php is_writable' (930 ms)
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://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_helper.php https://gitlab.com/lisit1003/TTPHPServer | 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://gitlab.com/fredec/ionizecms-1.0.8.x | 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 */setup.php https://github.com/xoops-pi/engine.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');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"; 37file.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"); 181CAssetManager.php https://gitlab.com/muthuvel.ns/imp-file | 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;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;File.php https://github.com/robeendey/ce.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; 21interface.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 . '&hmbkp_download_backup=' . $encoded_file . '&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 . '&hmbkp_delete_backup=' . $encoded_file . '&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> | 256search.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/graaaf/garant.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.File.php https://github.com/gryzz/crystal_magento.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.');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 ? ' ' : ' '; 276 $crlf = $is_cli ? PHP_EOL : '<br />'; 277Logger.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;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'); 194admin_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 ) ?>&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() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&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>class-wp-filesystem-ftpext.php https://gitlab.com/websumon/tosnib | 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;SplFileInfo.php https://gitlab.com/iranjith4/hhvm | PHP | 444 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 * 417 /** 418 * ( excerpt from http://php.net/manual/en/splfileinfo.setinfoclass.php ) 419 *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;search.php https://github.com/erikfrerejean/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 {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 {theme-editor.php https://gitlab.com/Gashler/sg | 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 ) ?>&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() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&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>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) );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;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).');'); 218behat_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)) {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 *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'))) { 246LangReplacer.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(); 152Common.php https://gitlab.com/gricelya/test | 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 }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> </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> </td> 108 <td> </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>Filesystem.php https://gitlab.com/kimting254/wbms | PHP | 441 lines
1<?php namespace Illuminate\Filesystem; 2 245 { 246 return is_writable($path); 247 }core.write_cache_file.php https://gitlab.com/tjaafar/SuiteCRM | 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-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;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 permissionsclass-wp-filesystem-ftpsockets.php https://gitlab.com/Gashler/dp | 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??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');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"; ?>&theme=<?php echo urlencode($theme) ?>&dir=theme"><?php echo $filedesc ?></a></li> 186<?php endwhile; ?> 202 ?> 203 <li><a href="theme-editor.php?file=<?php echo "$style_file"; ?>&theme=<?php echo urlencode($theme) ?>&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() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&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-ftpsockets.php https://gitlab.com/woxiprogrammers/infinia-wordpress | 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-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;upload.php https://github.com/misa/core.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;xpdozip.class.php https://github.com/JoeBlow/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);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". 219upload.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 // @codingStandardsIgnoreLineplugin.php https://bitbucket.org/llxff/orgupframework.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"; 123file_info.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 455 lines
1<?php 2// This file is part of Moodle - http://moodle.org/ 250 */ 251 public function is_writable() { 252 return true;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);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));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'); 93file.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. 317file.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 toClasses.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!");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);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(page.admin.serverSettings.tmpl https://github.com/deadeyes/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">configure.php https://github.com/2600hz/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'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. Thefile_info_context_user.php https://gitlab.com/unofficial-mirrors/moodle | 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;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.');xpdofilevehicle.class.php https://gitlab.com/haque.mdmanzurul/modx-improve-carolyn | 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;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 <?phpindex.php https://github.com/billortell/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>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 ) ?>&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() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&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'; 19core.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 ) { 326install.php https://bitbucket.org/nanomites_webdev/heroframework.git | PHP | 285 lines
72 // read in current config 73 $config_file = read_file(APPPATH . 'config/config.php'); 74 80 // write config file 81 write_file(APPPATH . 'config/config.php',$config_file,'w'); 82 91 // write database file 92 write_file(APPPATH . 'config/database.php',$database_file,'w'); 93 96 $structure = read_file(APPPATH . 'updates/install.php'); 97 $structure = str_replace('<?php if (!defined(\'BASEPATH\')) exit(\'No direct script access allowed\'); ?>','',$structure); 98 272 // write the file that disables the installer - they can't even refresh this page now 273 write_file(APPPATH . 'config/installed.php', '<?php /* App is installed */ ?>','w'); 274FileCache.php https://gitlab.com/mario.uriarte/doctrine2.5-tutorial | PHP | 286 lines
1<?php 2/* 90 91 if ( ! is_writable($directory)) { 92 throw new \InvalidArgumentException(sprintf( 103 $this->extensionStringLength = strlen($this->extension); 104 $this->isRunningOnWindows = defined('PHP_WINDOWS_VERSION_BUILD'); 105 } 143 // to 260 chars (including terminating null char). Using long UNC ("\\?\" prefix) does not work with the PHP API. 144 // And there is a bug in PHP (https://bugs.php.net/bug.php?id=70943) with path lengths of 259. 145 // So if the id in hex representation would surpass the limit, we use the hash instead. The prefix prevents 246 247 if ( ! is_writable($filepath)) { 248 return false;bootstrap.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 240 lines
78} else if (version_compare($phpunitversion, '3.6.0', 'lt')) { 79 phpunit_bootstrap_error(PHPUNIT_EXITCODE_PHPUNITWRONG, $phpunitversion); 80} 108if (!isset($CFG->phpunit_dataroot)) { 109 phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, 'Missing $CFG->phpunit_dataroot in config.php, can not run tests!'); 110} 116if (!is_dir($CFG->phpunit_dataroot)) { 117 phpunit_bootstrap_error(PHPUNIT_EXITCODE_CONFIGERROR, '$CFG->phpunit_dataroot directory can not be created, can not run tests!'); 118} 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}index.php https://github.com/jrivett/oscommerce2.git | PHP | 234 lines
126 127 if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) { 128 @chmod(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php', 0777); 130 131 if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) { 132 @chmod(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php', 0777); 134 135 if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) { 136 $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php'; 138 139 if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !osc_is_writable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) { 140 $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php'; 146 if ($compat_register_globals == false) { 147 $warning_array['register_globals'] = 'Compatibility with register_globals is supported from PHP 4.3+. This setting <u>must be enabled</u> due to an older PHP version being used.'; 148 }PhpArrayAdapter.php https://github.com/FabienD/symfony.git | PHP | 419 lines
1<?php 2 25/** 26 * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0. 27 * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter. 31 */ 32class PhpArrayAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface 33{ 44 /** 45 * @param string $file The PHP file were values are cached 46 * @param AdapterInterface $fallbackPool A pool to fallback on when an item is not hit 66 /** 67 * This adapter takes advantage of how PHP stores arrays in its latest versions. 68 * 68 * 69 * @param string $file The PHP file were values are cached 70 * @param CacheItemPoolInterface $fallbackPool A pool to fallback on when an item is not hitController.php https://github.com/stackboxcms/stackboxcms.git | PHP | 313 lines
1<?php 2namespace Module\Filebrowser; 181 // May want to take into account all the file upload errors... 182 // @link http://us3.php.net/manual/en/features.file-upload.errors.php 183 if($fileData['error'] == UPLOAD_ERR_OK) { 299 // Directory is writeable? 300 if($dirAvailable && !is_writable($dir)) { 301 $dirAvailable = chmod($dir, $chmod);bootstrap.php https://github.com/rwijaya/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/xoops-pi/legacy.git | PHP | 537 lines
18 * @author Taiwen Jiang <phppp@users.sourceforge.net> 19 * @version $Id: file.php 1509 2008-04-27 10:18:38Z phppp $ 20 * @package class 26 * 27 * PHP versions 4 and 5 28 * 28 * 29 * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> 30 * Copyright 2005-2008, Cake Software Foundation, Inc. 38 * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. 39 * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project 40 * @package cake 41 * @subpackage cake.cake.libs 42 * @since CakePHP(tm) v 0.2.9 43 * @version $Revision: 6311 $install.php https://gitlab.com/Poorchop/Jirafeau | PHP | 370 lines
1<?php 2/* 23 24define ('JIRAFEAU_CFG', JIRAFEAU_ROOT.'lib/config.local.php'); 25define ('JIRAFEAU_VAR_RAND_LENGTH', 15); 26 27require (JIRAFEAU_ROOT . 'lib/functions.php'); 28require (JIRAFEAU_ROOT . 'lib/lang.php'); 28require (JIRAFEAU_ROOT . 'lib/lang.php'); 29require (JIRAFEAU_ROOT . 'lib/config.original.php'); 30 40 $handle = fopen (JIRAFEAU_CFG, 'w'); 41 fwrite ($handle, '<?php' . NL); 42 fwrite ($handle, 44 t ('This file was generated by the install process. ' . 45 'You can edit it. Please see config.original.php to understand the ' . 46 'configuration items.') . ' */' . NL);file.php https://bitbucket.org/enangyusup/vbulletin-cakephp.git | PHP | 278 lines
1<?php 2/** 5 * 6 * PHP versions 4 and 5 7 * 7 * 8 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 9 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 14 * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org) 15 * @link http://cakephp.org CakePHP(tm) Project 16 * @package cake 17 * @subpackage cake.cake.libs.cache 18 * @since CakePHP(tm) v 1.2.0.4933 19 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 88 if (!class_exists('File')) { 89 require LIBS . 'file.php'; 90 }options-permalink.php https://github.com/enoex/artisanchairs.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>SerializerBuilder.php https://gitlab.com/cuza/Clinic_Recods | PHP | 400 lines
1<?php 2 22use JMS\Serializer\Builder\DriverFactoryInterface; 23use JMS\Serializer\Handler\PhpCollectionHandler; 24use JMS\Serializer\Handler\PropelCollectionHandler; 30use JMS\Serializer\Construction\UnserializeObjectConstructor; 31use PhpCollection\Map; 32use JMS\Serializer\EventDispatcher\EventDispatcher; 108 } 109 if ( ! is_writable($dir)) { 110 throw new InvalidArgumentException(sprintf('The cache directory "%s" is not writable.', $dir)); 121 $this->handlerRegistry->registerSubscribingHandler(new DateHandler()); 122 $this->handlerRegistry->registerSubscribingHandler(new PhpCollectionHandler()); 123 $this->handlerRegistry->registerSubscribingHandler(new ArrayCollectionHandler());Factory.php https://bitbucket.org/alexandretaz/maniac_divers.git | PHP | 277 lines
1<?php 2/** 49 protected static $writerExtensions = array( 50 'php' => 'php', 51 'ini' => 'ini', 78 79 if ($extension === 'php') { 80 if (!is_file($filename) || !is_readable($filename)) { 153 154 if (!is_writable($directory)) { 155 throw new Exception\RuntimeException(upgrade.php https://github.com/binaryfold4/concrete5.git | PHP | 329 lines
1<?php 2defined('C5_EXECUTE') or die("Access Denied."); 30 foreach($updates as $upd) { 31 if (is_dir(DIR_APP_UPDATES . '/' . $upd) && is_writable(DIR_APP_UPDATES . '/' . $upd)) { 32 if (file_exists(DIR_APP_UPDATES . '/' . $upd . '/' . DISPATCHER_FILENAME) && is_writable(DIR_APP_UPDATES . '/' . $upd . '/' . DISPATCHER_FILENAME)) {upload.php https://github.com/sydlawrence/SocialFeed.git | PHP | 162 lines
1<?php defined('SYSPATH') OR die('No direct access allowed.'); 2/** 5 * 6 * $Id: upload.php 3769 2008-12-15 00:48:56Z zombor $ 7 * 10 * @copyright (c) 2007-2008 Kohana Team 11 * @license http://kohanaphp.com/license.html 12 */ 55 56 if ( ! is_writable($directory)) 57 throw new Kohana_Exception('upload.not_writable', $directory);file.php https://github.com/mcgrue/pingpawn.git | PHP | 545 lines
4 * 5 * PHP versions 4 and 5 6 * 6 * 7 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) 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://cakephp.org CakePHP(tm) Project 15 * @package cake 16 * @subpackage cake.cake.libs 17 * @since CakePHP(tm) v 0.2.9 18 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) 25if (!class_exists('Object')) { 26 require LIBS . 'object.php'; 27}ZendPlatform.php https://github.com/benbruscella/vpcounselling.com.git | PHP | 316 lines
1<?php 2/** 24 */ 25require_once 'Zend/Cache/Backend.php'; 26 29 */ 30require_once 'Zend/Cache/Backend/Interface.php'; 31 71 } 72 if (!is_writable($accConf['output_cache_dir'])) { 73 Zend_Cache::throwException('The cache copies directory \''. ini_get('zend_accelerator.output_cache_dir') .'\' must be writable !'); 192 } 193 $cache_dir .= '/.php_cache_api/'; 194 return $this->_clean($cache_dir, $mode);File.php https://github.com/tanduy/zf.git | PHP | 465 lines
25 */ 26require_once 'Zend/CodeGenerator/Php/Abstract.php'; 27 30 */ 31require_once 'Zend/CodeGenerator/Php/Class.php'; 32 86 if ($fileName == '') { 87 require_once 'Zend/CodeGenerator/Php/Exception.php'; 88 throw new Zend_CodeGenerator_Php_Exception('FileName does not exist.'); 293 require_once 'Zend/CodeGenerator/Php/Exception.php'; 294 throw new Zend_CodeGenerator_Php_Exception('Expecting either an array or an instance of Zend_CodeGenerator_Php_Class'); 295 } 457 if ($this->_filename == '' || !is_writable(dirname($this->_filename))) { 458 require_once 'Zend/CodeGenerator/Php/Exception.php'; 459 throw new Zend_CodeGenerator_Php_Exception('This code generator object is not writable.');helper_file.php https://gitlab.com/AhmedMedo/Seo | PHP | 216 lines
1<?php 2 63 'pdf' => 'application/pdf', 64 'php' => 'application/x-httpd-php', 65 'php3' => 'application/x-httpd-php', 65 'php3' => 'application/x-httpd-php', 66 'php4' => 'application/x-httpd-php', 67 'phps' => 'application/x-httpd-php-source', 67 'phps' => 'application/x-httpd-php-source', 68 'phtml' => 'application/x-httpd-php', 69 'png' => 'image/png', 105 106/** Checks if the given file is really writable. The standard PHP function 107 * is_writable() does not work properly on Windows servers. 128 129/** Get MIME type of the given filename. If Fileinfo PHP extension is 130 * available the MIME type will be fetched by the file's content. Themisc.php https://gitlab.com/Gashler/dp | PHP | 667 lines
1<?php 2/** 132 // else check for write access to the file. 133 if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) { 134 if ( got_mod_rewrite() ) { 159 160 // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP 161 if ( iis7_supports_permalinks() && ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) ) { 526/** 527 * Display the default admin color scheme picker (Used in user-edit.php) 528 * 532 global $_wp_admin_css_colors, $user_id; ?> 533<fieldset><legend class="screen-reader-text"><span><?php _e('Admin Color Scheme')?></span></legend> 534<?php 538foreach ( $_wp_admin_css_colors as $color => $color_info ): ?> 539<div class="color-option"><input name="admin_color" id="admin_color_<?php echo esc_attr( $color ); ?>" type="radio" value="<?php echo esc_attr( $color ); ?>" class="tog" <?php checked($color, $current_color); ?> /> 540 <table class="color-palette">Common.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 851 lines
61 */ 62 function is_php($version) 63 { 68 { 69 $_is_php[$version] = version_compare(PHP_VERSION, $version, '>='); 70 } 82 * 83 * is_writable() returns TRUE on Windows servers when you really can't write to 84 * the file, based on the read-only attribute. is_writable() is also unreliable 86 * 87 * @link https://bugs.php.net/bug.php?id=54709 88 * @param string 176 { 177 require_once(APPPATH.$directory.'/'.$name.'.php'); 178 }display-items.page.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 510 lines
347 ?> 348 <tr class="product-edit <?php echo ( wpsc_publish_status($product['id']) ) ? ' wpsc_published' : ' wpsc_not_published'; ?>" id="product-<?php echo $product['id']?>" > 349 <th class="check-column" scope="row"> 349 <th class="check-column" scope="row"> 350 <input type='checkbox' name='product[]' class='deletecheckbox' value='<?php echo $product['id'];?>' title="ID #<?php echo $product['id']; ?>" /> 351 <?php echo do_action('wpsc_admin_product_checkbox', $product['id']); ?> 355 <td class="product-image "> 356 <img title='Drag to a new position' src='<?php echo $image_path; ?>' alt='<?php echo $product['name']; ?>' width='38' height='38' /> 357 </td> 361 ?> 362 <a class='edit-product' href='<?php echo $edit_product_url; ?>' title="ID #<?php echo $product['id']; ?>: <?php echo $product_name; ?>"><?php echo $product_name; ?></a> 363 <?php 374 ?> 375 <img alt='<?php echo $product_alert['messages'];?>' title='<?php echo $product_alert['messages'];?>' class='product-alert-image' src='<?php echo WPSC_URL;?>/images/product-alert.jpg' alt='' /> 376 <?phpmisc.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 615 lines
1<?php 2/** 132 // else check for write access to the file. 133 if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) { 134 if ( got_mod_rewrite() ) { 156 157 // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP 158 if ( ( ! file_exists($web_config_file) && win_is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable($web_config_file) ) { 387 /* First we check if the DOMDocument class exists. If it does not exist, 388 * which is the case for PHP 4.X, then we cannot easily update the xml configuration file, 389 * hence we just bail out and tell user that pretty permalinks cannot be used. 389 * hence we just bail out and tell user that pretty permalinks cannot be used. 390 * This is not a big issue because PHP 4.X is going to be depricated and for IIS it 391 * is recommended to use PHP 5.X NTS. 393 * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'. 394 * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs 395 * via ISAPI then pretty permalinks will not work.file.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 1039 lines
22 'tag.php' => __( 'Tag Template' ), 23 'category.php' => __( 'Category Template' ), 24 'page.php' => __( 'Page Template' ), 30 'functions.php' => __( 'Theme Functions' ), 31 'attachment.php' => __( 'Attachment Template' ), 32 'image.php' => __('Image Attachment Template'), 35 'application.php' => __('Application Attachment Template'), 36 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 37 '.htaccess' => __( '.htaccess (for rewrite rules )' ), 38 // Deprecated files 39 'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); 40 298 else 299 $error_msg = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' ); 300 return call_user_func($upload_error_handler, $file, $error_msg);class.AppUpgraderDiskUtil.php https://github.com/SimonCoopey/ThinkUp.git | PHP | 297 lines
1<?php 2/** 3 * 4 * ThinkUp/webapp/_lib/class.AppUpgraderDiskUtil.php 5 * 34 */ 35 var $CONFIG = array( array('/\/config\.inc\.php$/', 'config.inc.php') ); 36 /** 169 public function findAllFiles($file) { 170 if (!is_writable($file)) { 171 throw new Exception(self::getInadequateFilePermissionsException()); 200 if ($config) { 201 $filename .= 'config.inc.backup.php'; 202 } else { 277 foreach($app_files as $file) { 278 if (!is_writable($file)) { 279 throw new Exception(self::getInadequateFilePermissionsException());import1.php https://github.com/condesan/infoandina.git | PHP | 366 lines
207 $randval = mt_rand(); 208 include_once dirname(__FILE__)."/commonlib/lib/userlib.php"; 209 $uniqid = getUniqid(); 350<tr><td><?php echo $GLOBALS['I18N']->get('emails_file'); ?></td><td><input type="file" name="import_file"></td></tr> 351<tr><td><?php echo $GLOBALS['I18N']->get('field_delimiter'); ?></td><td><input type="text" name="import_field_delimiter" size=5> <?php echo $GLOBALS['I18N']->get('tab_default'); ?></td></tr> 352<tr><td><?php echo $GLOBALS['I18N']->get('record_delimiter'); ?></td><td><input type="text" name="import_record_delimiter" size=5> <?php echo $GLOBALS['I18N']->get('line_break_default'); ?></td></tr> 352<tr><td><?php echo $GLOBALS['I18N']->get('record_delimiter'); ?></td><td><input type="text" name="import_record_delimiter" size=5> <?php echo $GLOBALS['I18N']->get('line_break_default'); ?></td></tr> 353<tr><td colspan=2><?php echo $GLOBALS['I18N']->get('info_test_output'); ?></td></tr> 354<tr><td><?php echo $GLOBALS['I18N']->get('test_output'); ?></td><td><input type="checkbox" name="import_test" value="yes"></td></tr> 355<tr><td colspan=2><?php echo $GLOBALS['I18N']->get('info_notification_email'); ?></td></tr> 356<tr><td><?php echo $GLOBALS['I18N']->get('notification_email'); ?><input type="radio" name="notify" value="yes"></td><td><?php echo $GLOBALS['I18N']->get('confirmed_immediately'); ?><input type="radio" name="notify" value="no"></td></tr> 357<?php 357<?php 358include_once dirname(__FILE__)."/subscribelib2.php"; 359print ListAllAttributes();elFinderVolumeMySQL.class.php https://gitlab.com/rohiri/SIINDI | PHP | 896 lines
1<?php 2 143 144 $this->tmpPath = is_dir($tmp) && is_writable($tmp) ? $tmp : false; 145 }elFinderVolumeLocalFileSystem.class.php https://gitlab.com/rohiri/SIINDI | PHP | 835 lines
1<?php 2 89 $this->quarantine = $this->root.DIRECTORY_SEPARATOR.$this->options['quarantine']; 90 if ((!is_dir($this->quarantine) && !$this->_mkdir($this->root, $this->options['quarantine'])) || !is_writable($this->quarantine)) { 91 $this->archivers['extract'] = array(); 288 $stat['read'] = is_readable($path); 289 $stat['write'] = is_writable($path); 290 if ($stat['read']) {Upgrade.php https://github.com/innovationslabkosovo/Kosovo-Youth-Resources-Map.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 {OnionUpgradeScript.class.php https://gitlab.com/x33n/ProjectPier-Core | PHP | 394 lines
1<?php 2 23 */ 24 private $check_is_writable = array( 25 '/config/config.php', 64 65 $config_is_set = require_once INSTALLATION_PATH . '/config/config.php'; 66 if (!$config_is_set) { 85 86 foreach ($this->check_is_writable as $relative_path) { 87 $path = ROOT . $relative_path; 88 if (is_file($path)) { 89 if (file_is_writable($path)) { 90 $this->printMessage("File '$relative_path' exists and is writable"); 95 } elseif (is_dir($path)) { 96 if (folder_is_writable($path)) { 97 $this->printMessage("Folder '$relative_path' exists and is writable");SimpleGdImage.class.php https://gitlab.com/x33n/ProjectPier-Core | PHP | 619 lines
1<?php 2 139 } // if 140 if (!file_is_writable($this->getSource())) { 141 throw new FileNotWritableError($this->getSource());SimpleGdImage.class.old.php https://gitlab.com/x33n/ProjectPier-Core | PHP | 549 lines
1<?php 2 155 } // if 156 if (!file_is_writable($this->getSource())) { 157 throw new FileNotWriableError($this->getSource());files.php https://gitlab.com/x33n/ProjectPier-Core | PHP | 650 lines
1<?php 2 8 */ 9 function folder_is_writable($path) { 10 if (!is_dir($path)) { 24 return true; 25 } // folder_is_writable 26 32 */ 33 function file_is_writable($path) { 34 if (!is_file($path)) { 44 return true; 45 } // file_is_writable 46write.id3v2.php https://gitlab.com/x33n/ampache | PHP | 939 lines
1<?php 2///////////////////////////////////////////////////////////////// 10/// // 11// write.id3v2.php // 12// module for writing ID3v2 tags // 12// module for writing ID3v2 tags // 13// dependencies: module.tag.id3v2.php // 14// /// 16 17getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true); 18 45 if (!getid3_lib::intValueSupported($OldThisFileInfo['filesize'])) { 46 $this->errors[] = 'Unable to write ID3v2 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB'; 47 fclose($fp_source); 64 65 if (is_readable($this->filename) && is_writable($this->filename) && is_file($this->filename) && ($fp = fopen($this->filename, 'r+b'))) { 66 rewind($fp);AdminShopUrlController.php https://gitlab.com/staging06/myproject | PHP | 564 lines
1<?php 2/* 9* It is also available through the world-wide-web at this URL: 10* http://opensource.org/licenses/osl-3.0.php 11* If you did not receive a copy of the license and are unable to 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 41 42 /* if $_GET['id_shop'] is transmitted, virtual url can be loaded in config.php, so we wether transmit shop_id in herfs */ 43 if ($this->id_shop = (int)Tools::getValue('shop_id')) { 118 { 119 $update_htaccess = Tools::modRewriteActive() && ((file_exists('.htaccess') && is_writable('.htaccess')) || is_writable(dirname('.htaccess'))); 120AdminPerformanceController.php https://gitlab.com/staging06/myproject | PHP | 997 lines
1<?php 2/* 9* It is also available through the world-wide-web at this URL: 10* http://opensource.org/licenses/osl-3.0.php 11* If you did not receive a copy of the license and are unable to 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 102 'value' => 'filesystem', 103 'label' => $this->l('File System').(is_writable(_PS_CACHE_DIR_.'smarty/cache') ? '' : ' '.sprintf($this->l('(the directory %s must be writable)'), realpath(_PS_CACHE_DIR_.'smarty/cache'))) 104 ),AdminLanguagesController.php https://gitlab.com/staging06/myproject | PHP | 581 lines
1<?php 2/* 9* It is also available through the world-wide-web at this URL: 10* http://opensource.org/licenses/osl-3.0.php 11* If you did not receive a copy of the license and are unable to 22* @copyright 2007-2015 PrestaShop SA 23* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 24* International Registered Trademark & Property of PrestaShop SA 126 $this->displayWarning($this->l('When you delete a language, all related translations in the database will be deleted.')); 127 if (!is_writable(_PS_ROOT_DIR_.'/.htaccess') && Configuration::get('PS_REWRITING_SETTINGS')) { 128 $this->displayInformation($this->l('Your .htaccess file must be writable.')); 176 /* TO DO - ajouter les liens dans le hint ? */ 177 /*'desc' => sprintf($this->l('Short date format (e.g., %s)'), '<a href="http://php.net/date" target="_blank">Y-m-d</a>')*/ 178 ), 185 /* TO DO - ajouter les liens dans le hint ? */ 186 /*'desc' => sprintf($this->l('Full date format (e.g., %s)'), '<a href="http://php.net/date" target="_blank">Y-m-d H:i:s</a>')*/ 187 ),functions.php https://gitlab.com/blueprintmrk/bladencountyrecords | PHP | 1484 lines
1<?php 2 2 3if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); } 4 117 $message = sprintf($message, $galleryID, '<strong>[nggallery id=' . $galleryID . ']</strong>'); 118 $message .= '<a href="' . admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid=' . $galleryID . '" >'; 119 $message .= __('Edit gallery','nggallery'); 266 if (file_exists($image->thumbPath)) 267 if (!is_writable($image->thumbPath)) 268 return $image->filename . __(' is not writeable ','nggallery'); 348 349 if (!is_writable($image->imagePath)) 350 return ' <strong>' . $image->filename . __(' is not writeable','nggallery') . '</strong>'; 396 397 if (!is_writable($image->imagePath)) 398 return ' <strong>' . $image->filename . __(' is not writeable','nggallery') . '</strong>';class-http.php https://gitlab.com/Blueprint-Marketing/WordPress-1 | PHP | 1490 lines
1<?php 2/** 18 * This class is used to consistently make outgoing HTTP requests easy for developers 19 * while still being compatible with the many PHP configurations under which 20 * WordPress runs. 139 $r['blocking'] = true; 140 if ( ! wp_is_writable( dirname( $r['filename'] ) ) ) 141 return new WP_Error( 'http_request_failed', __( 'Destination directory for file streaming does not exist or is not writable.' ) ); 245 * 246 * The order for requests is cURL, and then PHP Streams. 247 *