PHP Login Question with Index file?
Why does my login script only work when i am at the URL: "http://localhost:80/". Why does it n开发者_如何学JAVAot work when i am at the URL: "http://localhost/index.php".
I am using MAMP with php 5.2 on it. The Ports are set to 80 and 5506. 1. When i login from index.php it gives me a resource id 5. 2. Why does this happen and how should i fix it?
Please can you explain it in easy terms? Thank You
You have made an error inside your login script with the data you are returning. PHP has a resource variable type it uses for database connections and file handles. In your code you are apparently doing an "echo $var", and $var is a resource variable. This is why you are seeing "resource id 5".
You should probably make a new php/mysql question, that includes the source where this is occurring, if you need further help.
Are you accessing you file through MAMP Localhost then appending index.php. Try removing the http:// when you go through your server/Localhost it doesn't include the http://..
精彩评论