On Sat, 2005-10-22 at 10:02, Jasper Bryant-Greene wrote:
> On Fri, 2005-10-21 at 21:01 -0400, Robert Cummings wrote:
> > Oh I know, I was just pointing out that it won't work :) Doesn't work
> > because it only strips off the first path segment (assuming no off by
> > one error also ;). For instanc
On Fri, 2005-10-21 at 21:01 -0400, Robert Cummings wrote:
> Oh I know, I was just pointing out that it won't work :) Doesn't work
> because it only strips off the first path segment (assuming no off by
> one error also ;). For instance:
>
> /a/b/c/d/foo.php
>
> becomes:
>
> a/b/c/d/foo.p
On Fri, 2005-10-21 at 19:58, Minuk Choi wrote:
> ... what, the off by one error?
>
> Hey, I was just providing suggestion off the top of my head. :-P
Oh I know, I was just pointing out that it won't work :) Doesn't work
because it only strips off the first path segment (assuming no off by
one err
... what, the off by one error?
Hey, I was just providing suggestion off the top of my head. :-P
-Minuk
Robert Cummings wrote:
On Thu, 2005-10-20 at 23:27, Minuk Choi wrote:
Off the top of my head...
$filename = $_SERVER['PHP_SELF'];
$strippedFilename = substr($filename, strrpos($filena
On Thu, 2005-10-20 at 23:27, Minuk Choi wrote:
> Off the top of my head...
>
> $filename = $_SERVER['PHP_SELF'];
>
> $strippedFilename = substr($filename, strrpos($filename, '/'));
Won't work, I'll leave the reason as an exercise :B
Cheers,
Rob.
--
.
Off the top of my head...
$filename = $_SERVER['PHP_SELF'];
$strippedFilename = substr($filename, strrpos($filename, '/'));
references :
http://us3.php.net/substr
http://us3.php.net/manual/en/function.strrpos.php
-Minuk
John Taylor-Johnston wrote:
SCRIPT_NAME and PHP_SELF always include lea
On Thu, 2005-10-20 at 22:22, John Taylor-Johnston wrote:
> SCRIPT_NAME and PHP_SELF always include leading url information and
> slashes. Is there a function I can use to skin either down to the
> filename? No slashes or leading url.
echo ereg_replace( '^.*/', '', $_SERVER['SCRIPT_NAME'] )
ereg
On Thu, 2005-10-20 at 22:22 -0400, John Taylor-Johnston wrote:
> SCRIPT_NAME and PHP_SELF always include leading url information and
> slashes. Is there a function I can use to skin either down to the
> filename? No slashes or leading url.
http://php.net/basename for filesystem paths
http://php
8 matches
Mail list logo