Yup! That's the one! I was missing PATH...
:)
Thank you very much for such a nice explanation!
-afan
M. Sokolewicz wrote:
Matt M. wrote:
$path = 'product_images';
$handle = opendir($path);
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
Nope! It doesnt work either...
:(
Matt M. wrote:
$path = 'product_images';
$handle = opendir($path);
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
echo $file;
if (is_dir($file))
{
echo ' <-- folde
Matt M. wrote:
$path = 'product_images';
$handle = opendir($path);
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
echo $file;
if (is_dir($file))
{
echo ' <-- folder';
$folders[] = $fi
> $path = 'product_images';
> $handle = opendir($path);
> while (false !== ($file = readdir($handle)))
> {
> if ($file != "." && $file != "..")
> {
> echo $file;
> if (is_dir($file))
> {
> echo ' <-- folder';
>
I have script that create directories after item's name and each
directory has 2 images: big image and it's thumbnail (both jpgs)
But, when I run this code:
$path = 'product_images';
$handle = opendir($path);
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $
5 matches
Mail list logo