View previous topic :: View next topic |
Author |
Message |
datwig -
Joined: 26 Jan 2003 Posts: 85
|
Posted: Wed Apr 23, 2003 11:11 pm Post subject: Loging out with Cookies |
|
|
How do I create a "Logout" Script when I set you logged in with cookies. I tried Code: | setcookie("username", "");
setcookie("password", ""); |
But it gives me Error 200. What do I do? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Apr 24, 2003 12:12 pm Post subject: Re: Loging out with Cookies |
|
|
datwig wrote: | How do I create a "Logout" Script when I set you logged in with cookies. I tried Code: | setcookie("username", "");
setcookie("password", ""); |
But it gives me Error 200. What do I do? |
Error 200 means that the script run OK but that it sent nothing to the web server. So add an echo "OK" there and all would be fine.
Try to do a search on the forum for error 200 for more information. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
datwig -
Joined: 26 Jan 2003 Posts: 85
|
Posted: Thu Apr 24, 2003 8:42 pm Post subject: |
|
|
Man, that Error 200 thing is anoying.
Anyway, can you teach me how to create a blank directory (an empty folder)? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Apr 25, 2003 2:38 pm Post subject: |
|
|
datwig wrote: | Man, that Error 200 thing is anoying.
Anyway, can you teach me how to create a blank directory (an empty folder)? |
Blank directory??? Sorry, but can you explain what you mean exactly? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
datwig -
Joined: 26 Jan 2003 Posts: 85
|
Posted: Fri Apr 25, 2003 4:48 pm Post subject: |
|
|
Problem:
Using mkdir("path"); to make an empty folder. I want to do it so if the folder doesn't exist, then create it. I used the following code. Code: | if (opendir("./folder") == false) {
mkdir("./folder");
} | But when the directory doesn't exist, it gives an error and then creates the directory.
How I solved it:
I looked in a PHP book I bought (SAMS teach yourself PHP in 24 hours) and I saw a is_dir() function. Although it didn't give any information about using is_dir(), I assumed it would be like isset() so I tried it out and came up with: Code: | if (is_dir("./folder") == false) {
mkdir("./folder");
} | And now it works fine. |
|
Back to top |
|
|
|