DOH so far no good.
I tried
<?php
//require the connection data.
require ('./info.rqr');
// The data base is huge so hold open the php for a few extra minutes
set_time_limit(600);
//get the connection stuff set up
$get_list = "SELECT category FROM category order by id ";
$get_list_res = mysql_query($get_list) or die(mysql_error());
//set up a loop to build the directories. Also print to the screen so I know what
//is going on.
while ($recs = mysql_fetch_array($get_list_res))
{
$category= stripslashes($recs['category']);
echo "$category<br>";
mkdir ("./$category", 0755);
echo "<br><br>";
}
?>
and got this as an error
Arts
Warning: mkdir(Arts ): Invalid argument in C:\Program Files\Apache Group\Apache2\htdocs\mkdir.php on line 15
Warning: mkdir(C:\Program Files\Apache Group\Apache2\htdocs\Arts): File exists in C:\Program Files\Apache Group\Apache2\htdocs\mkdir.php on line 16
Arts/Movies
Warning: mkdir(Arts/Movies ): Invalid argument in C:\Program Files\Apache Group\Apache2\htdocs\mkdir.php on line 15
Warning: mkdir(C:\Program Files\Apache Group\Apache2\htdocs\Arts): File exists in C:\Program Files\Apache Group\Apache2\htdocs\mkdir.php on line 16
So it is obviously reading the database.
I changed to
<?php
//require the connection data.
require ('./info.rqr');
// The data base is huge so hold open the php for a few extra minutes
set_time_limit(600);
//get the connection stuff set up
$get_list = "SELECT category FROM category order by id ";
$get_list_res = mysql_query($get_list) or die(mysql_error());
//set up a loop to build the directories. Also print to the screen so I know what
//is going on.
while ($recs = mysql_fetch_array($get_list_res))
{
$category= stripslashes($recs['category']);
echo "$category<br>";
mkdir (".\$category", 0755);
echo "<br><br>";
}
?>
and then got
Arts
Warning: mkdir(.$category): File exists in C:\Program Files\Apache Group\Apache2\htdocs\mkdir.php on line 15
Arts/Movies
Warning: mkdir(.$category): File exists in C:\Program Files\Apache Group\Apache2\htdocs\mkdir.php on line 15
and it built a directory called $directory
for what should be such an easy script i am getting owned.
Tks again