Gropai
Gropai

Reputation: 331

Why can't I access local files using file directory on WAMP

I installed WAMP at D:\wamp and put my files in D:\wamp\www. I can access and render PHP files correctly on the browser through "localhost/index.php", but if I access the file through "D:\wamp\www\index.php", the file doesn't render correctly. Why can't I access the file using the file directory?

Upvotes: 0

Views: 389

Answers (1)

Geovani Santos
Geovani Santos

Reputation: 391

The PHP executes script through browser. In this case localhost or http://127.0.0.1/. You can include files using include("D:\wamp\www\index.php") function.

Upvotes: 0

Related Questions