labaiss Posted August 2, 2010 Report Share Posted August 2, 2010 Labdien, Kādam ir kāds gatavs php scripts aizķēries directory apjoma (Mb, Gb......) noteikšanai, kurā atrodas visāda formāta faili..... nepieciešams tikai lai izvada skaitli - piem. 12 Mb Paldies. Quote Link to comment Share on other sites More sharing options...
briedis Posted August 2, 2010 Report Share Posted August 2, 2010 Hmm, man ir! http://tinyurl.com/245w92k Quote Link to comment Share on other sites More sharing options...
sandis_m Posted August 2, 2010 Report Share Posted August 2, 2010 Hmm, man ir! http://tinyurl.com/245w92k :D ++ Quote Link to comment Share on other sites More sharing options...
labaiss Posted August 2, 2010 Author Report Share Posted August 2, 2010 Hmm, man ir! http://tinyurl.com/245w92k Pāldies! Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted August 2, 2010 Report Share Posted August 2, 2010 Reku pats iisaakais skirpts ^_^ $directory = '/home/ratrijs/'; echo exec("du -mh $directory"); Quote Link to comment Share on other sites More sharing options...
Леший Posted August 2, 2010 Report Share Posted August 2, 2010 rATRIJS n00b, var vēl īsāk: die(exec("du -mh /home/ratrijs/")); Quote Link to comment Share on other sites More sharing options...
bubu Posted August 2, 2010 Report Share Posted August 2, 2010 Un ja man Windows? Kas man du portēt vajag? Quote Link to comment Share on other sites More sharing options...
Леший Posted August 2, 2010 Report Share Posted August 2, 2010 (edited) taisi bat failu getsize.bat: @echo off setlocal enabledelayedexpansion set dir=%1 set size=0 for /R %dir% %%F in (*) do ( set /a size=!size!+%%~zF ) echo %size% endlocal tad die(exec("getsize.bat C:\DOCUME~1\ratrijs")); EDIT: Atvainojos, pieliec vēl @echo off bat faila sākumā. EDIT2: Jā, un rādīs viņš aktuālo izmēru, nevis size on disk. Edited August 2, 2010 by Леший Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted August 2, 2010 Report Share Posted August 2, 2010 damn :( bet...BET - maneejaa ir nodaliits direktorijas variablis! Kas ir mega pluss - gandriiz vai MVC ^_^ Quote Link to comment Share on other sites More sharing options...
Леший Posted August 2, 2010 Report Share Posted August 2, 2010 Ok, MVC: die(exec("du -mh ".($dirname="/home/ratrijs/"))); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.