Re: [PHP] Re: FImage $aSubDir

2008-10-29 Thread Maciek Sokolewicz

Ashley Sheridan wrote:

On Tue, 2008-10-28 at 23:52 -0400, John Taylor-Johnston wrote:

Could it be this easy?

$chopped= strlen($aFn) - 4;
$filename = $chopped.".txt";

print"color='#99'>";

   include($filename);
print"";

John Taylor-Johnston wrote:
I have http://www.flash-here.com/downloads/fhimage.html installed. I 
like it just the way it is.

But instead of displaying (see function below).
Instead of displaying the file name under the photo, weak excuse for a 
caption,

I would like to open and nl2br the contents of a like named text file.

$chopped= strlen($aFn) - 4;
$openthis = $chopped.".txt";

How do I proceed?
John

---original code
   echo "";
   if($aSubDir == "") {
 $l = strlen($aFn) - 4;
 echo substr($aFn, 0, $l);
   } else {
 echo $aSubDir."[dir]";
   }
   echo "";



Yeah, but don't use the font tag.


Ash
www.ashleysheridan.co.uk

and no because you can't apply nl2br easily on the thing you included 
there unless you use output buffering. You wanted to "open" a file and 
nl2br it. How? You could use the fopen function (surprise, surprise) and 
the nl2br function (wow) later on. Of course these days it's easier to 
call file_get_contents($filename) and apply nl2br on its return value.


- Tul

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: FImage $aSubDir

2008-10-29 Thread Ashley Sheridan
On Tue, 2008-10-28 at 23:52 -0400, John Taylor-Johnston wrote:
> Could it be this easy?
> 
> $chopped= strlen($aFn) - 4;
> $filename = $chopped.".txt";
> 
> print" color='#99'>";
>include($filename);
> print"";
> 
> John Taylor-Johnston wrote:
> > I have http://www.flash-here.com/downloads/fhimage.html installed. I 
> > like it just the way it is.
> > But instead of displaying (see function below).
> > Instead of displaying the file name under the photo, weak excuse for a 
> > caption,
> > I would like to open and nl2br the contents of a like named text file.
> > 
> > $chopped= strlen($aFn) - 4;
> > $openthis = $chopped.".txt";
> > 
> > How do I proceed?
> > John
> > 
> > ---original code
> >echo "";
> >if($aSubDir == "") {
> >  $l = strlen($aFn) - 4;
> >  echo substr($aFn, 0, $l);
> >} else {
> >  echo $aSubDir."[dir]";
> >}
> >echo "";
> 
> 
Yeah, but don't use the font tag.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: FImage $aSubDir

2008-10-28 Thread John Taylor-Johnston

Could it be this easy?

$chopped= strlen($aFn) - 4;
$filename = $chopped.".txt";

print"color='#99'>";

  include($filename);
print"";

John Taylor-Johnston wrote:
I have http://www.flash-here.com/downloads/fhimage.html installed. I 
like it just the way it is.

But instead of displaying (see function below).
Instead of displaying the file name under the photo, weak excuse for a 
caption,

I would like to open and nl2br the contents of a like named text file.

$chopped= strlen($aFn) - 4;
$openthis = $chopped.".txt";

How do I proceed?
John

---original code
   echo "";
   if($aSubDir == "") {
 $l = strlen($aFn) - 4;
 echo substr($aFn, 0, $l);
   } else {
 echo $aSubDir."[dir]";
   }
   echo "";



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php