What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » [small php request] can someone write me hash creator

Pages: (2): « First « 1 [ 2 ] Last »
[small php request] can someone write me hash creator
Author: Message:
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [small php request] can someone write me hash creator
quote:
Originally posted by Chris Boulton
By the way, the way you are looping over the directory is bad. You should be using:
code:
while ($file = readdir($dir_handle)) !== false) {

while ($file = readdir($dir_handle)) !== false)
Two '(' were and and then you close 3? Mind explaining why? And also what would !== false do :P?
quote:
Originally posted by Dempsey
But that error is nothing todo with your script, you can ignore it.
You mean to say that my code has no mistakes :P?
04-02-2007 02:51 PM
Profile E-Mail PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: [small php request] can someone write me hash creator
It should be:
code:
while (false !== ($file = readdir($handle))) {
as shown on the php.net page both the correct and wrong ways, http://uk2.php.net/readdir .
[Image: sig.png]
04-02-2007 03:29 PM
Profile PM Web Find Quote Report
surfichris
Former Admin
*****

Avatar

Posts: 2365
Reputation: 81
Joined: Mar 2002
RE: [small php request] can someone write me hash creator
quote:
Originally posted by Felu

while ($file = readdir($dir_handle)) !== false)
Two '(' were and and then you close 3? Mind explaining why?
Typo.
quote:
Originally posted by hmaster
And also what would !== false do
Try yours, place a file called "0" in the directory along with some others and watch yours exit on that.

0 is essentially false when doing standard == checking so you need to compare at the actual level which is ===. In that case, 0 != false, 0 = 0.
04-02-2007 11:37 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On