* Thus wrote Mag:
> Hi Curt,
> Thanks for replying.
>
> > $obSaveFile = new SaveToFile();
> > $obSaveFile->open('/path/to/file.html');
> > ob_start(array(&$obSaveFile, 'save'), 1024);
> >
> > /* do your stuff here */
> >
> > ob_end_flush();
> > $obSaveFile->close();
>
>
> Problem is, I have n
Hi Curt,
Thanks for replying.
> class SaveToFile {
> function open($file) {
> //open file...
> }
> function write($buf) {
> //write to file...
> }
> function close() {
> //close file
> }
> }
> $obSaveFile = new SaveToFile();
> $obSaveFile->open('/path/to/file.html');
> ob
Mag wrote:
Hi,
I have never done this before (but in my first test it
seems to work), I am include()ing a file into a
variable like this:
$a=include("th-file.php");
Will this give me any extra problems later on? or is
this resource intensive?
I've seen other people do something similar to this,
but
ApexEleven wrote:
I believe that include() returns true|false, so $a would equal true if
the file is included and false if it is not.
If you use *return* on global scope in include file that value will be
returned to $a.
-- test.php --
$test = "Hello";
return $test;
-
$a = include "test.php";
* Thus wrote Mag:
> Hi,
> I have never done this before (but in my first test it
> seems to work), I am include()ing a file into a
> variable like this:
>
> $a=include("th-file.php");
>
> Will this give me any extra problems later on? or is
> this resource intensive?
>
> The reason I am doing th
[snip]
$a=include("th-file.php");
[/snip]
Mag,
I have never seen this approach before.
This is the way I would do something like
that.
$file="./th-file.php";
if (!($fp = fopen($file,"r"))){
echo "Could not open ".$file;
exit();
}
$a = fread($fp, filesize($file));
fclose($fp);
I believe that include() returns true|false, so $a would equal true if
the file is included and false if it is not.
On Thu, 14 Oct 2004 10:35:15 -0700 (PDT), Mag <[EMAIL PROTECTED]> wrote:
> Hi,
> I have never done this before (but in my first test it
> seems to work), I am include()ing a file in
7 matches
Mail list logo