What exactly is the difference between accessing a file through HTML (e.g. <img src="xxx.jpg">
) or JavaScript, and using PHP to read a file. The file is still just on the server in both cases, isn't it?
What makes using PHP to access the server's file system different to someone just typing in the URL of the file (provided they know what it is)?