[PHP] strange issue with PHP $basename, first character in filename missing (FreeBSD)

2009-10-25 Thread Per olof Ljungmark
, the first character in a file name is lost using the PHP "basename" function. Below is an excerpt from a Horde webmail server's log that shows the error. More reading can be found on the Horde list here: http://marc.info/?l=horde&m=124653708009981&w=2 and here

Re: [PHP] basename unix/windows

2002-04-25 Thread Erik Price
On Thursday, April 25, 2002, at 09:54 AM, Matt Friedman wrote: > Replace the "\" with "/" using str_replace or some such function before > using basename. Windows will handle either kind of path. Linux does not > know the "\" as a file path separator. It only knows "/" Just make sure that you

Re: [PHP] basename unix/windows

2002-04-25 Thread Stuart Dallas
ROBERT MCPEAK <[EMAIL PROTECTED]> wrote: > In other words: > > basename(/usr/blah/doh/yuck/wow/abigfile.html) > > resolves to : abigfile.html > > but > > basename(adirectory\onawindowsbox\abigfile.html) > > does not resovle to abigfile.html. > > Does anybody have a workaround for this? Conv

RE: [PHP] basename unix/windows

2002-04-25 Thread Matt Friedman
ia.com -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Thursday April 25, 2002 9:41 AM To: [EMAIL PROTECTED] Subject: [PHP] basename unix/windows I'm running php on linux and wish to use basename() to get the file name from a windows path. basename() on our

Re: [PHP] basename unix/windows

2002-04-25 Thread Alexander Weber
ROBERT MCPEAK wrote: > basename(/usr/blah/doh/yuck/wow/abigfile.html) > > resolves to : abigfile.html > > but > > basename(adirectory\onawindowsbox\abigfile.html) > > does not resovle to abigfile.html. > > Does anybody have a workaround for this? > What about str_replace()? -- PHP General

[PHP] basename unix/windows

2002-04-25 Thread ROBERT MCPEAK
I'm running php on linux and wish to use basename() to get the file name from a windows path. basename() on our linux/php box can't seem to cope with the use of backslash (\) in the Windows paths I'm feeding it. In other words: basename(/usr/blah/doh/yuck/wow/abigfile.html) resolves to : abig

Re: [PHP] basename()

2001-08-21 Thread Gerard Samuel
Oh yes, I dont like warnings. Thanks for pointing that out Renze Munnik wrote: > On Mon, Aug 20, 2001 at 03:42:34PM -0400, Gerard Samuel wrote: > >>$file = basename ($path); >>$file = $file.php3; >> >> > > You might want to consider using, > > $file = basename ($path); > $file = "$file.php3";

Re: [PHP] basename()

2001-08-21 Thread Renze Munnik
On Mon, Aug 20, 2001 at 03:42:34PM -0400, Gerard Samuel wrote: > $file = basename ($path); > $file = $file.php3; > You might want to consider using, $file = basename ($path); $file = "$file.php3"; // <-- ! instead, if you don't like warnings. $file = $file.php3 isn't the way to do

Re: [PHP] basename()

2001-08-20 Thread Gerard Samuel
$file = basename ($path); $file = $file.php3; Jeremy Morano wrote: > Hello, > > Can someone please show me how to use basename() correctly? > This is what I am doing: > > $file = basename ($path); > $file = basename ($path,".php3"); > > This is the error I'm gettig: > > Warning: Wrong paramet

[PHP] basename()

2001-08-20 Thread Jeremy Morano
Hello, Can someone please show me how to use basename() correctly? This is what I am doing: $file = basename ($path); $file = basename ($path,".php3"); This is the error I'm gettig: Warning: Wrong parameter count for basename() in /home/virtual/ppcu/home/httpd/html/jeremy/stats4.php on line 43