Re: Re: Issues with fopen & long file names?

From: Date: Fri, 21 Dec 2001 15:27:55 +0000
Subject: Re: Re: Issues with fopen & long file names?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78475@lists.php.net to get a copy of this message
Try this : $fp = fopen("C:\\WINNT\\Temp\\adodb_9002b91d2d52c10124c949e2b415a980.cache", "r"); HTH, Andrey ----- Original Message ----- From: "Garth Dahlstrom" <garth@utmail.to> To: <php-general@lists.php.net> Sent: Friday, December 21, 2001 5:24 PM Subject: [PHP] Re: Issues with fopen & long file names? > I have no problems using fopen to open up a long > file name under Win2k Pro... > > $fp = fopen("C:\WINNT\Temp\adodb_9002b91d2d52c10124c949e2b415a980.cache", > "r"); > > I notice in the example you give your file has a trailing > space, not sure if that would throw things at all. > > Have you tried using *$array = file($filename);* to > see if your problem is fopen specific? > > -GED > > #################### (Attached Message) ####################----- Javier > Muniz > ----- Issues with fopen & long file names? > ----- Thu, 20 Dec 2001 13:44:59 -0800 > > I'm trying to open a file using php 4.1.0 under windows 2k server. > The script uses fopen and the filename is long (approx 40 characters + > extension). > I'm getting the error: > > Warning: fopen("c:\_file_345176fo90301b70374d2f30e5a11d5b.ext ", "r") - > Invalid argument in file.php on line 127 > > can fopen not handle long file names, or am I doing something wrong? The > script uses \\ not \, so that's not the problem (even though only one \) is > displayed above. > > if fopen can't display long file names, is there a function that will return > the short (i.e. _file_~1.ext) format? > > any help is appreciated. > > Javier Muniz > Granicus, LTD. (www.granicus.com) > Tel: (415) 522-5216 > Fax: (415) 522-5215 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#78475) next »