Solved

OpenDir: Invalid argument

Posted on 2004-08-09
1
588 Views
Last Modified: 2013-12-13
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
Comment
Question by:iam_dumb
1 Comment
 
LVL 3

Accepted Solution

by:
thecode101 earned 200 total points
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now