Click here to Skip to main content
15,890,690 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(D:\xam\htdocs\s0/,D:\xam\htdocs\s0/): The system cannot find the file specified. (code: 2)' in D:\xam\htdocs\s\upload.php:103 Stack trace: #0 D:\xam\htdocs\s\upload.php(103): RecursiveDirectoryIterator->__construct('D:\\xam\\htdocs\\s...') #1 D:\xam\htdocs\s\upload.php(141): dirsize('D:\\xam\\htdocs\\s...') #2 {main} thrown in D:\xam\htdocs\s\upload.php on line 103


Here is the code i am using.
http://freetexthost.com/jzl4o2hyh3[^]

Please help!
Posted
Comments
ZurdoDev 19-Oct-15 10:07am    
"The system cannot find the file specified." Seems like the error is pretty clear, isn't it?
Hannibal Lector 19-Oct-15 10:17am    
What file is it asking for ?
ZurdoDev 19-Oct-15 10:18am    
Keep reading the error, in D:\xam\htdocs\s\upload.php:103. What is line 103 in your file?
Hannibal Lector 19-Oct-15 10:22am    
100. function dirsize($directory)
101. {
102. $size = 0;
103. foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory)) as $file)
104. {
105. $size += $file->getSize();
106. }
107. return $size;
}
ZurdoDev 19-Oct-15 10:23am    
Correct. That is what is throwing the error.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900