I have added a project under wamp64/www folder. When I try to add the project as virtual host, its showing some error like
Warning: fopen(C:/WINDOWS/system32/drivers/etc/hosts): failed to open stream: Permission denied in C:\wamp64\www\add_vhost.php on line 429
Are you actually trying to update the windows hosts file from php?
That is a really bad idea, that file is protected and can only be updated by an administrator.
It might be possible to work around but I would not attempt it since.
Windows only
Security issues
Security issues
Security issues
Security issues
Security issues
Security issues
Security issues
Security issues
Security issues
Security issues
A hacker can basically add entries to the hosts file and redirect any site they want including phising site where they then will be able to get your bank information and any other sensitive stuff.