|
|
|
 |

December 6th, 2003, 09:53 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Imperator Fyron:
Could be. I think all of those errors are due to misconfigurations in your PHP files... I only used standard PHP functions and such, and did not define anything with any names given by the errors.
|
I think it's the parameters in stristr that needs to be surrounded by quotes for the errors to disappear.
I have standrad settings for most PHP settings except file sizes and magic quotes.
[ December 06, 2003, 07:55: Message edited by: Ruatha ]
|

December 6th, 2003, 09:57 AM
|
 |
Captain
|
|
Join Date: Nov 2002
Location: Finland
Posts: 864
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Imperator Fyron:
I fail to see a problem with this line:
array_multisort($fileArray, SORT_ASC, SORT_STRING);
|
You have a wrong parameter. Array_multisort requires an array, not a multi-dimensional array. You have to modify $fileArray a bit. Now it's $fileArray[$counter][0], change it to $fileArray[0][$counter]. Then you can sort it easily. For example:
array_multisort($fileArray[0], SORT_ASC, SORT_STRING);//sorts by names.
Have you noticed when you use $file = readdir($dir_handle) you get first "." and then ".." and but then real filenames.
__________________
'The surest sign that there is intelligent life elsewhere in the universe is that none of it has tried to contact us.' Calvin and Hobbes
Are you tough enough to be the King of the Hill?
|

December 7th, 2003, 02:56 AM
|
 |
Major General
|
|
Join Date: May 2002
Location: Linghem, Östergötland, Sweden
Posts: 2,255
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Quote:
Originally posted by Asmala:
quote: Originally posted by Imperator Fyron:
I fail to see a problem with this line:
array_multisort($fileArray, SORT_ASC, SORT_STRING);
|
You have a wrong parameter. Array_multisort requires an array, not a multi-dimensional array. You have to modify $fileArray a bit. Now it's $fileArray[$counter][0], change it to $fileArray[0][$counter]. Then you can sort it easily. For example:
array_multisort($fileArray[0], SORT_ASC, SORT_STRING);//sorts by names.
Have you noticed when you use $file = readdir($dir_handle) you get first "." and then ".." and but then real filenames. Yep, it's the current directory "." and the directory above ".."
as in ms dos;
CD..
|

December 13th, 2003, 11:23 PM
|
 |
Captain
|
|
Join Date: Nov 2002
Location: Finland
Posts: 864
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: PHP Help Needed
Fyron, did you get the sorting working or did you lost interest to the whole thing?
__________________
'The surest sign that there is intelligent life elsewhere in the universe is that none of it has tried to contact us.' Calvin and Hobbes
Are you tough enough to be the King of the Hill?
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|