当前位置: 首页 > news >正文

济南网站建设cnwenhui建立网站的流程多少钱

济南网站建设cnwenhui,建立网站的流程多少钱,济南网站制作定制公司,wordpress主题学习disk_free_space()(PHP 4 4.1.0, PHP 5, PHP 7)返回目录中的可用空间说明disk_free_space(string$directory):float给出一个包含有一个目录的字符串#xff0c;本函数将根据相应的文件系统或磁盘分区返回可用的字节数。参数$directory文件系统目录或者磁盘分区。Note:如果…disk_free_space()(PHP 4 4.1.0, PHP 5, PHP 7)返回目录中的可用空间说明disk_free_space(string$directory):float给出一个包含有一个目录的字符串本函数将根据相应的文件系统或磁盘分区返回可用的字节数。参数$directory文件系统目录或者磁盘分区。Note:如果指定了文件名而不是文件目录这个函数的行为将并不统一会因操作系统和 PHP 版本而异。返回值以浮点返回可用的字节数或者在失败时返回FALSE。范例Example #1disk_free_space()例子?php // $df 包含根目录下可用的字节数$df disk_free_space(/);//在 Windows 下:$df_c disk_free_space(C:);$df_d disk_free_space(D:);?注释Note:此函数不能作用于远程文件被检查的文件必须是可通过服务器的文件系统访问的。参见Transformation is possible WITHOUT using loops:$bytes disk_free_space(.);$si_prefix array( B, KB, MB, GB, TB, EB, ZB, YB);$base 1024;$class min((int)log($bytes , $base) , count($si_prefix) - 1);echo $bytes . ;echo sprintf(%1.2f, $bytes / pow($base,$class)) . . $si_prefix[$class] . ;?Nice, but please be aware of the prefixes.SI specifies a lower case k as 1000 prefix.It doesnt make sense to use an upper case K as binary prefix,while the decimal Mega (M and following) prefixes in SI are uppercase.Furthermore, there are REAL binary prefixes since a few years.Do it the (newest and recommended) IEC way:KBs are calculated decimal; power of 10 (1000 bytes each)KiBs are calculated binary; power of 2 (1024 bytes each).The same goes for MB, MiB and so on...Feel free to read:http://en.wikipedia.org/wiki/Binary_prefix$si_prefix array( B, KB, MB, GB, TB, EB, ZB, YB );you are missing the petabyte after terabyteB, KB, MB, GB, TB, EB, ZB, YBshould look likeB, KB, MB, GB, TB, PB, EB, ZB, YBAnother easy way to convert bytes to human readable sizes would be this:function HumanSize($Bytes){$Typearray(, kilo, mega, giga, tera, peta, exa, zetta, yotta);$Index0;while($Bytes1024){$Bytes/1024;$Index;}return(.$Bytes. .$Type[$Index].bytes);}?It simply takes the $Bytes and divides it by 1024 bytes untill its no longer over or equal to 1024, meanwhile it increases the $Index to allocate which suffix belongs to the return (adding bytes to the end to save some space).You can easily modify it so its shorter, but I made it so its more clearer.Nitrogen.Note that disk_free_space() does an open_basedir check.With respect to Linux filesystems, Ill point out that this function returns the space available in the current volume or mountpoint, not the total physical disk space. That is, this function used on the /root volume shows the free space in /root, which is different from /home, and so on.?php function size($size, array $optionsnull) {$o [binary false,decimalPlaces 2,decimalSeparator .,thausandsSeparator ,maxThreshold false, // or thresholds keysufix [thresholds [, K, M, G, T, P, E, Z, Y],decimal {threshold}B,binary {threshold}iB]];if ($options ! null)$o array_replace_recursive($o, $options);$count count($o[sufix][thresholds]);$pow $o[binary] ? 1024 : 1000;for ($i 0; $i $count; $i)if (($size pow($pow, $i 1)) ||($i $o[maxThreshold]) ||($i ($count - 1)))returnnumber_format($size / pow($pow, $i),$o[decimalPlaces],$o[decimalSeparator],$o[thausandsSeparator]) .str_replace({threshold},$o[sufix][thresholds][$i],$o[sufix][$o[binary] ? binary: decimal]);}var_dump(size(disk_free_space(/)));// string(8) 14.63 GBvar_dump(size(disk_free_space(/), [binary true]));// string(9) 13.63 GiBvar_dump(size(disk_free_space(/), [maxThreshold 2]));// string(11) 14631.90 MBvar_dump(size(disk_free_space(/), [binary true, maxThreshold 2]));// string(12) 13954.07 MiB?On Windows, this also works with distant files, by using their full network path.For instance, this will give the % of free disk space on the share dir from remote host server :$path \\\\server\\dir;echo(floor(100 * disk_free_space($disk) / disk_total_space($disk)));?It can also work with drive letters mapped to a network path in certain cases.
http://www.zqtcl.cn/news/635870/

相关文章:

  • 做淘宝客的网站wordpress+附件丢失
  • 苏州市城乡建设局网站首页做动漫网站的素材
  • 济南网站建设系统介绍服务网站开发费属于研发支出吗
  • 网站建设方案进行工期安排Wix做的网站在国内打不开
  • 网站后台后缀名qq免费申请账号
  • seo网站优化代码静态网站可以做哪些
  • 网页素材及网站架构制作个人单页网站模板
  • 微小店网站建设价格建设网站设备预算
  • 电子商城网站开发公司泰州网络营销
  • 网站建设公司利润分配一些常用的网站
  • 鄂尔多斯做网站的公司北京企业网站设计报价
  • 南宁关键词网站排名wordpress付免签插件
  • 龙岩网站定制电子政务与网站建设方面
  • 东莞网站制作十强英语培训机构网站建设策划书
  • 住房和城乡建设部网站加装电梯苏州外发加工网
  • 企业网站管理系统带授权广州seo报价
  • 建设门户网站的意义旅游电商网站建设方案模板
  • 网站做动态图片不显示某购物网站开发项目
  • 大淘客网站logo怎么做紫鸟超级浏览器手机版
  • 专做公司网站 大庆wordpress编辑器百度云
  • 企业手机网站模板下载网站建设实训 考核要求
  • 企业网站建设的ppt4414站长平台
  • 物流网站制作怎么做pc网站开发
  • 合肥做网站可以吗网站程序 seo
  • 网站备案 动态ip网站多域名
  • 网站加速免费电子商务网站建设的认识
  • 做职业资格考试的网站有哪些网页游戏排行榜2024前十名
  • 网站设计方案怎么写wordpress仿站软件
  • 汕头建站模板系统北京有哪些电商平台公司
  • 深圳网站建设zhaoseo小包工头接活的平台