RE: [PHP] i think im crazy..
| From: | Maxim Maletsky | Date: | Fri, 22 Dec 2000 04:54:01 +0000 |
| Subject: | RE: [PHP] i think im crazy.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-31538@lists.php.net to get a copy of this message | ||
I think so too...
you cannot assign an include() or require() to a variable.
when in the middle of the code there's an include() or require() it means
that the parser has to get out from the current file (remembering where it
was) and start parsing the file specified. Once in that file it finds EOF
(end of file) it closes it and reparses the original file staring from the
point he left it.
it is not an object that you can remember by a variable.
printing it means you just look for TRUE; or FALSE; ...
TRUE is 1, FALSE is 0.
your output is zero because include fails in the way you are trying to do.
use fopen().
Cheers,
Maxim Maletsky
-----Original Message-----
From: enthalpy [mailto:enthalpy@core.com]
Sent: Friday, December 22, 2000 8:18 AM
To: php-general@lists.php.net
Subject: [PHP] i think im crazy..
ok.. i have a javascript that i wrote and because of problems ive had to
resort to doing the following
<?php
$werd = require("javascript");
print "$werd";
?>
i go to a browser and bring this up.. and its fine except there is a
"0" at the bottom of the page.. ive gone through all my code and i cant
find what is printing this. however when i changed the require() to
include() i get a "1" at the bottom of the page. does anyone know what is
going on?
<-----CoreComm-Internet-Services--http://core.com/----->
(Jon Marshall CoreComm Services Chicago)
(jonathon.marshall@core.com Systems Engineer II)
(enthalpy@core.com Network Operations)
<-----Enthalpy.org------------http://enthalpy.org/----->
(enthalpy@enthalpy.org The World of Nothing)
<------------------------------------------------------>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net