Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hello, I am using XAMPP, apacher server for my php scripts... The default path f

ID: 3616112 • Letter: H

Question

Hello,
I am using XAMPP, apacher server for my php scripts...
The default path for reading files from is xampp/htdocs/
but if, someone stores files in another drives lets say in D drive,how will he read *.html or *.php files from other drives, whereXAMPP is not installed...?

Like, if a file index.php is placed in "C:/XAMPP/htdocs/myfiles/"then its link will be "http://localhost/myfiles" OR"http://localhost/myfiles/index.php"

But if I want to share a folder "myfiles2" and all of its contentsplaced in D Drive, like "D:/myfiles2/" then how this folder will beshared? And what will be its link, which I would open in webbrowser...??? :)

Thanks...!

Any answer will be appreciated!

Explanation / Answer

1) Open C: mpppacheconfextrahttpd-vhosts.conf Uncomment line 19: NameVirtualHost*:80 Add the following:    DocumentRoot C:/xampp/htdocs    ServerName localhost           Options IndexesFollowSymLinks Includes ExecCGI        AllowOverride All        Order allow,deny        Allow from all          DocumentRoot d:/myfiles2    ServerName myfiles2           Options IndexesFollowSymLinks Includes ExecCGI        AllowOverride All        Order allow,deny        Allow from all       2) Add the following to your hosts file (located inC:WindowsSystem32driversetchosts for Windows Vista): 127.0.0.1       myfiles2 3) Restart Apache You then should be able to access myfiles via thisurl: myfiles2 or http://myfiles2
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote