[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 606
  • Last Modified:

OpenDir: Invalid argument

I'm trying to get working following code:

$path = "C:\\@\\";
$dp = opendir($path);

and get following error:

OpenDir: Invalid argument (errno 22)

Any chance to make it working with '@' character in path?

TIA,
dumb
0
iam_dumb
Asked:
iam_dumb
1 Solution
 
thecode101Commented:
Try this:
$dp = opendir('c:/@');

I tested it using the following script and it worked correctly:
<?php
if ($handle = opendir('c:/@'))
{
      while (false !== ($file = readdir($handle)))
         {
              if ($file != "." && $file != "..")
                  {
                        echo $file;
              }
       }
}
else
      echo "Unable to Open Folder";
?>
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now