Show DevBest [PHP/OOP] Image Uploader by m0nsta.

Status
Not open for further replies.

habbz

Custom Title bitchssssssss
Nov 12, 2010
227
1
OFT:^^ you just naturally fail i uploaded to your site for you.
ONT: works really nice, now all i gotta do is figure out how to make it look all nice ;D

Thanks!
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
Very nice Mark, I shall be using this as part of my user system, for the avatar uploading (; - Cheers!
 

RyanMK

Still alive
May 27, 2010
802
117
This code may also help.

PHP:
<?php
function countFiles($strDirName)
{
if ($hndDir = opendir($strDirName))
{
$intCount = 0;
while (false !== ($strFilename = readdir($hndDir)))
{
if ($strFilename != "." && $strFilename != "..")
{
$intCount++;
}
}
closedir($hndDir);
}
else
{
$intCount = -1;
}

return $intCount;
}

echo countFiles("uploads/");
?>
This will count how many files are in the upload folder
 

TheJacob

Member
Sep 3, 2010
70
0
I see, well good job testing it then. A few suggestions (pretending OOP was the right choice here):

- You should be using interfaces.
- Some of these functions could be abstracted.
- Pointers could be used.
- The function visibility should be properly done (you only coded one function properly).

So you can do a better job next time :)
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
I see, well good job testing it then. A few suggestions (pretending OOP was the right choice here):

- You should be using interfaces.
- Some of these functions could be abstracted.
- Pointers could be used.
- The function visibility should be properly done (you only coded one function properly).

So you can do a better job next time :)

I don't care about the look of it, the functionality is all that matters to me.
 

Kristopher

Photographer
Dec 25, 2010
803
68
I know i can get a infraction for this but i think the thread should be up still its worth it and i need help with it
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
I know i can get a infraction for this but i think the thread should be up still its worth it and i need help with it

Instead of posting something like this, just explain what your problem is, and im sure somebody will be able to help you.
 
Status
Not open for further replies.

Users who are viewing this thread

Top