Wamp is installed correctly and it works fine. However, when I try to open a file with Chrome (or any other) from the file explorer it opens the file with raw code: file:///C:/wamp/www/testing/built-in.php But when I manually change the URL to localhost/tesing/built-in.php then the php code is executed fine.
So my question is: is there a way to open a PHP file in "localhost" instead of the "file:///" directly from the file explorer?
WAMP is a server, therefore the files can only be executed whilst being called from the server rather than from the local drive. When opening from the local drive, the file "by-passes" the server and it is directly displayed via the browser.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.