Khaelyx Posted April 10, 2012 Share Posted April 10, 2012 Ok so I have someone needing me to write a php page(s) to basically check the current size of a file in a directory and display the current size and max allocated size then create a dynamically changing image to reflect those parameters(i.e. pise chart, bar graph, etc.) all called to an intranet page. I work at a business where we upload OS images to a server file but that file is only allocated so much space. The problem we are running into is that we do not know when the space is full until all of our uploads fail. :-\ We are attempting to create a visual representation of that space so that we know when to purge the space of the old temporary images. I dont even know where to start on this .. would someone please point me in the direction of some code that would get me started on building this project? I have exhausted my efforts on Google and other PHP pages.. I am new to PHP so I may already be in over my head but I am adventurous and will try anything. Thanx in advance Khaelyx Quote Link to comment https://forums.phpfreaks.com/topic/260667-php-get-file-size-and-post-dynamic/ Share on other sites More sharing options...
litebearer Posted April 10, 2012 Share Posted April 10, 2012 This may help to get you started... http://bytes.com/topic/php/answers/593461-how-check-folder-size Quote Link to comment https://forums.phpfreaks.com/topic/260667-php-get-file-size-and-post-dynamic/#findComment-1336018 Share on other sites More sharing options...
dcro2 Posted April 10, 2012 Share Posted April 10, 2012 And you can get how much free space you have with disk_free_space. Quote Link to comment https://forums.phpfreaks.com/topic/260667-php-get-file-size-and-post-dynamic/#findComment-1336054 Share on other sites More sharing options...
Khaelyx Posted April 11, 2012 Author Share Posted April 11, 2012 Thank you very much!! I have been racking my brain about how to do this.. Excellent start. Thank you again! Quote Link to comment https://forums.phpfreaks.com/topic/260667-php-get-file-size-and-post-dynamic/#findComment-1336275 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.