meowmeow
-
Posts
2 -
Joined
-
Last visited
Never
Posts posted by meowmeow
-
-
i've worked with vbulletin... and it has all the functionalities you need.
gotta pay for it tho!
i've worked with vbulletin... and it has all the functionalities you need.
gotta pay for it tho!
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
php directories on windows
in PHP Coding Help
Posted
i consider myself quite experienced at php... but am having a nervous breakdown on something real stupid.
I installed an emulator on a windows computer, and am trying to use php scripts on the pc.
so i do this:
[code]
$path = "C:\Documents and Settings\blablabla\Desktop\TEST\\";
$myDirectory = opendir($path);
while($entryName = readdir($myDirectory))
{
$dirs[]=$entryName;
}
closedir($myDirectory);
print_r($dirs);
[/code]
so far so good. I get a list of the directories within $path.
Array
(
[0] => .
[1] => ..
[2] => 640x800
[3] => 800x600
[4] => 800x800
[5] => BuffMonster
[6] => deleteemptydirs.bat
[7] => formato_immagini.bat
)
then...
[code]
foreach($dirs as $value){
if($value!="." && $value!="..")
{
echo $path.$value."\\<br>";
if(is_dir($path.$value)){
echo "is a directory<br>";
$mydirectory2=opendir($path.$value."\\");
echo readdir($mydirectory2)."<br>";;
while(($dir_name = readdir($mydirectory2)) !== FALSE);
{
echo " ".$dir_name."<br>";
}
closedir($mydirectory2);
print "<hr>";
}
}
}
[/code]
and here i can't get thru...
it prints: is a directory<br>
this part: [code]echo readdir($mydirectory2)."<br>"; [/code] prints a .
and this part : [code]echo " ".$dir_name."<br>";[/code] just prints
It wont tell me whats inside dir... I'm guessing the problem is that windows uses \ instead of /
so i have to use "\\" each time and i can get confusing... but this should be so simple can't figure out why it doesn't work...
please help!!!