Issue saving php that includes constant---
| From: | Shawn McKenzie | Date: | Wed, 12 Feb 2003 04:29:05 +0000 |
| Subject: | Issue saving php that includes constant--- | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-135267@lists.php.net to get a copy of this message | ||
I collect some PHP code in an HTML form (textarea) I then save this in an
array in a file using export_var(). If the code entered in the textarea is
this:
echo "To "._LOGIN." click the login link below";
And the constant _LOGIN happens to be defined in the current script that
generates the form (maybe _LOGIN = "Login" ), then the result after my
var_export() to the file is this:
$var = 'To Login click the login link below";';
Any ideas on how to keep the text of the constant definition in the string
instead of it being evaluated???
TIA,
Shawn