win_is_writable [ WordPress Function ]
win_is_writable ( $path )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_iso_descrambler, _get_list_table, wp_is_mobile, wp_not_installed, is_serialized
Workaround for Windows bug in is_writable() function
Source
<?php
function win_is_writable( $path ) {
/* will work in despite of Windows ACLs bug
* NOTE: use a trailing slash for folders!!!
* see http://bugs.php.net/bug.php?id=27609
* see http://bugs.php.net/bug.php?id=30931
*/
if ( $path[strlen( $path ) - 1] == '/' ) // recursively return a temporary file path
return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
else if ( is_dir( $path ) )
return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
// check tmp file for read/write capabilities
$should_delete_tmp_file = !file_exists( $path );
$f = @fopen( $path, 'a' );
if ( $f === false )
return false;
fclose( $f );
if ( $should_delete_tmp_file )
unlink( $path );
return true;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- #11995 (2.9.1 rc1 url rewrite rules constantly trying to re-add the ...
Replying to Frumph: string(32) "C:\inetpub\frumph.net/web.config" bool(true). I see now. The if is true based on the win_is_writable() at the end. I'll poke around ...
core.trac.wordpress.org - PHPXRef 0.7 : WordPress : /wp-admin/includes/misc.php source
'web.config'; 159 160 // Using win_is_writable() instead of is_writable() because of a bug in ... file_exists($web_config_file) && win_is_writable($home_path) ...
phpxref.ftwr.co.uk - wp-admin/includes/misc.php source
Aug 19, 2010 ... 'web.config'; 156 157 // Using win_is_writable() instead of ... PHP 158 if ( ( ! file_exists($web_config_file) && win_is_writable($home_path) ...
phpxref.com - /wp-admin/includes/misc.php source - PHP Cross Reference ...
Jun 1, 2011 ... 'web.config'; 159 160 // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP 161 if ( iis7_supports_permalinks() ...
xref.yoast.com