I need to know how to save an array into a .txt document as i cannot figure out how to do it.
Here is what i have so far:
Code: Select all
<?php
//Hold server IP
$ip_hold = $_SERVER['SERVER_ADDR'];
$ip_write = "The IP of the server that send this log is ".$ip_hold."";
//Open www directory
$dir = opendir("../../");
$count = 0;
$count2 = 0;
//Put all folders into an array
while (($file = readdir($dir)) !== false)
{
$files[$count]=$file;
$count++;
}
closedir($dir);
while ($count2 != $count)
{
$temp = $files[$count2];
$direc = "../../$temp";
if(is_dir($direc))
{
$filename = "../../$temp/pubstermx/inc/pubsterdomainconfig.php";
if (file_exists($filename))
{
require $filename;
$domaincount++;
$domainarray[$domaincount] = $DOMAIN_NAME;
echo "$domaincount ";
}
$count2++;
}
}
?>Does anyone have any ideas?
Thank you ^.^
~Daniel