PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
filesize() needs to know how to find the file so you can either use relative pathing or absolute paths. An absolute path would start with /, while a relative would either have dot, double-dot, or anything non-forward slash depending on it's location relative to the current directory, parent directory or a child directory (respectively)
feyd wrote:filesize() needs to know how to find the file so you can either use relative pathing or absolute paths. An absolute path would start with /, while a relative would either have dot, double-dot, or anything non-forward slash depending on it's location relative to the current directory, parent directory or a child directory (respectively)
/files is a root level folder reference, I'd be willing to bet it doesn't exist. If you know where the file is from the webroot, use $_SERVER['DOCUMENT_ROOT']