Jack wrote:
Try these, one at the time...Dear Joakim First of all, thx for the reply and here is the code :<? include 'phpstudy/constant.inc'; $link=mysql_pconnect(HOST,USER,PASSWD); mysql_select_db(DBNAME,$link); file://Define Date format $currentyear = date('y'); $currentmonth = date("m"); $previousmonth=$currentmonth -1; $curmondate=date("Y").$currentmonth; $premondate=date("Y").$previousmonth; // Define file extension, file path, share path $ext=".pdf"; $filepath="c:/pdf_reports/Bills/Oct02/"; $sharepath="/////Nedcoraphk/pdf_reports/Bills/"; file://open the directory (c:\pdf_reports\bills) $handle=opendir($filepath); while (false!==($file=readdir($handle))) { if (ereg("2002",$file)) { print ($file."<br>"); } } closedir($handle); file://check if the directory exist for last month file://Folder's Name $folder=date("M",mktime(0,0,0,$previousmonth,1,$currentyear)); $dirname="Oct-02"; if (is_dir("Oct-02")) { print ("Good"); } ?> here is the Error Message : Warning : OpenDir: Invalid argument (errno22) in c:\inetpub\wwwroot\nedcor internal live\reports\bills\reports\page.php on line 21 and second error message : Warning Supplied argument is not a valid Directory resource in c:\Interpub\wwwroot\nedcor internal live\reports\bills reports\page.php on line 22 have you seems somthing like this before? Thx a lot jack
$filepath="c:\\pdf_reports\\Bills\\Oct02\\";
$filepath="c:\\pdf_reports\\Bills\\";
How are your permissions set up?
Are they the same on Bills and the subfolder Oct02?
I see that among the last lines you have a referense to Oct-02. Please check at least two more times that you have got the folder name right at all places in your scripts.
Have you tried to delete (or just move) the subfolder and create it again?
Regards
Joakim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php