Re: [PHP] Code contents of a function

2003-01-03 Thread Khalid El-Kary
although i never needed to do such a thing, but you can open the PHP file with the file system functions fopen,fread,fgets ... and work with it using string functions strpos(),substr() ... File system functions: http://www.php.net/manual/en/ref.filesystem.php String functions: http://www.php.net

Re: [PHP] Code contents of a function

2003-01-02 Thread Gerald Timothy Quimpo
On Friday 03 January 2003 09:17 am, Shawn McKenzie wrote: > I have a script with some functions and within the script I want to read > the code from one of the functions into a string. you'd probably have to fopen/fgets or file, and then parse for the function start and end and read the contents.

Re: [PHP] Code contents of a function

2003-01-02 Thread Shawn McKenzie
What??? I want to read the code from the function into a string! "Peter Houchin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > so put it in a if or switch statement > > eg > > if ($var){ > myfunction(); > } > else { > sumotherfunction(); > } > > etc > > > >

RE: [PHP] Code contents of a function

2003-01-02 Thread Peter Houchin
so put it in a if or switch statement eg if ($var){ myfunction(); } else { sumotherfunction(); } etc > -Original Message- > From: Shawn McKenzie [mailto:[EMAIL PROTECTED]] > Sent: Friday, 3 January 2003 12:18 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Code contents of a function >