duanmu8911 2013-07-24 19:25
浏览 54

当我使用我的IP地址而不是localhost作为URL时出错

I have downloaded WAMP server and i have written a very very simple php code and saved it in

C:\wamp\www\php_lear

folder. I have tested it using chrome giving url as

{localhost/php_lear/eg2.php}

And it worked fine. This uses a database stored in phpmyadmin. I found out my ip address from google 117.195.230.41. When i give

{117.195.230.41/php_lear/eg2.php}

as URL it gives me 404 not found

"The requested URL '/php_lear/eg2.php' was not found on this server"

Please help. I have no knowledge of ips and urls and very new to this field and yeah i have added this ip as allowed user in phpmyadmin. I actually want to use this in my android app.

  • 写回答

2条回答 默认 最新

  • dsyo9700 2013-07-24 20:32
    关注

    The IP address you get from google is the IP address of your router. It does not point to your computer. As some ppl said, besides there is different ports to use in a connection and your WAMP installation is "listening" on the port 80 of your computer (127.0.0.1)

    When you access to the 117.195.230.41 you are accessing to the IP that your Internet Service Provider gives to your installation. So you need to access your router and redirect all the querys to the 117.195.230.41 on port 80 to your port 80 and the IP of your computer in your local network.

    评论

报告相同问题?