php-general | 2000071
Date: 07/13/00
- Next message: Ivan: "[PHP] $PHP_AUTH_USER problem"
- Previous message: Philip Hallstrom: "Re: [PHP] why is this not a bug? (popen, pclose)"
- Next in thread: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Reply: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
hi all,
this is my first posting, so if it's not quite right
excuse my
I have an 'application' which parses a given file,
which contains HTML & PHP3. For the HTML lines the
application writes the line to Dest_File.
For the PHP3 lines it's suppossed to interpret these
using the eval() statement, and depending on the PHP3
different text would be written out to the Dest_File.
except that doesn't work.
here's my code
(the contents of $complete_code has been read from
SRC_FILE)
$complete_code='if ($value == $today) echo "Hello
World";';
$temp_string = addslashes($complete_code);
eval("\new_string=\"$complete_code\";");
The value of $new_string is then:
if (1 == 1) echo "Hello World";
instead of "Hello World" or ""
any help on this would be very much appreciated.
thanks in advance,
alan
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Ivan: "[PHP] $PHP_AUTH_USER problem"
- Previous message: Philip Hallstrom: "Re: [PHP] why is this not a bug? (popen, pclose)"
- Next in thread: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Reply: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

