For example, my site is showing its "Index Of" page, and I want to download my index.php to look at its code. I know I can just go through the ftp or whatever, I'm just wondering if theres a way I can view the code from the "Index Of" of my site. When I do download it it says the file is 0bytes in size
Nope, php gets executed on the server before being sent to your browser, and you will get the output of the file, not the original code (I assume that PHP is installed and operational on your server) Can I ask why you would want to do this anyway? FTP is just as easy, plus allows you to save data back
Add this to the .htaccess file and delete the existing handler for php files. Basically you're telling the web server to treat .php files as text files, letting visitors see their content. AddHandler text/plain .php Code (markup):
I was just wondering, there was no particular reason it just came across my mind when viewing my "Index Of" page.
Ah I see, well this is why server side languages are used, because unless you have ftp access (or access other than http) then your sourcecode is secure and cannot be copied