Re: [PHP] Re: show_source question

2002-08-12 Thread Rasmus Lerdorf

file() returns an array, show_source() takes a string.

On Mon, 12 Aug 2002, eriol wrote:

 Thanks for the reply..

 I did try what you suggested, but am getting the following warning:

 Warning: Failed opening 'ArrayArrayArray' for highlighting in
 /hsphere/local/home/eriol/oo0oo.com/o0o.o0o on line 43

 (o0o is php)

 Line 43 is:

 show_source($show);

 I copied everything as written, so I'm not sure where the problem could be.. I
 assume ArrayArrayArray has to do with $show = file() portion of the code, but
 I don't know enough about php to debug it.. Do you, or anyone else, have an idea
 what may cause this?

 If it helps, the original show source code is here:  http://oo0oo.com (Just
 click the SHOW SOURCE link at the bottom of the page twice - going to the actual
 file of o0o.o0o isn't allowed)

 Thanks again Mike..

 Take care.. peace..
 eriol

 

 Mike Mannakee [EMAIL PROTECTED] disgorged:

 : You could just append the files into a string, then show the string instead.
 :
 : Like
 :
 : if(strlen($php)0){
 :$php = $DOCUMENT_ROOT . $php;
 :   if (ereg((\.php)$,$php)  !ereg(\/\.\., $php)){
 :  $show=file(head.php);
 :  $show.=file($php);
 :  $show.=file(foot.php);
 :  echo font class=\source\\n\n;
 :  show_source($show);
 :  echo \n\n/font\n;
 :}
 :
 : This would give you the full source, and would need to be in addition to
 : actually 'requiring' the files.
 :
 : If your show_source() function is set to take a file, you'd need to change
 : it to take a string instead.  Or save $show as a file and send the name or
 : handle (I'm not sure which it expects) to the function.
 :
 : Mike



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



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




Re: [PHP] Re: show_source question

2002-08-12 Thread eriol

Thanks for the reply.. As a newbie, I'm not understanding what else I could use,
even after searching the manual and google..

I've tried readfile() instead of file() which returns some, not all, of the
head.o0o code (I assume as a strong instead of an array), but I still get an
error:

Warning: Failed opening '11063121715' for highlighting in
/hsphere/local/home/eriol/oo0oo.com/o0o.o0o on line 43

I have no idea what 11063121715 is.. I have no files with numeric names and
don't have a clue where this number came from.. Line 43 still is:

show_source($show);

I don't expect someone to do the work for me, but if you or someone else could
suggest a function name or keywords to search for I'd definately appreciate it..
file() led me to look into readfile(), and it solved some of the problem by
printing out some of the head.o0o source (minus formatting issues within the
output which I can fix), but I don't know what to do about the 11063121715
highlighting error above..

Thanks again for your reply..

Take care.. peace..
eriol



Rasmus Lerdorf [EMAIL PROTECTED] disgorged:

: file() returns an array, show_source() takes a string.
:
: On Mon, 12 Aug 2002, eriol wrote:
:
:  Thanks for the reply..
: 
:  I did try what you suggested, but am getting the following warning:
: 
:  Warning: Failed opening 'ArrayArrayArray' for highlighting in
:  /hsphere/local/home/eriol/oo0oo.com/o0o.o0o on line 43
: 
:  (o0o is php)
: 
:  Line 43 is:
: 
:  show_source($show);
: 
:  I copied everything as written, so I'm not sure where the problem could be..
I
:  assume ArrayArrayArray has to do with $show = file() portion of the code,
but
:  I don't know enough about php to debug it.. Do you, or anyone else, have an
idea
:  what may cause this?
: 
:  If it helps, the original show source code is here:  http://oo0oo.com
(Just
:  click the SHOW SOURCE link at the bottom of the page twice - going to the
actual
:  file of o0o.o0o isn't allowed)
: 
:  Thanks again Mike..
: 
:  Take care.. peace..
:  eriol



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