Reply to [PHP] Generating a php file

Your name:

Reply:


Posted by Rory Browne on 05/11/05 23:04

You can start by clarifying. I had to read your message three times
before I got a vague understanding.

What I'm hearing is that you want to put something like
<?php $msg = get_message(); ?> into a string? You are having
difficulty doing this because you are finding that your string
contains the value of $msg, instead of a doller sign, followed by
'msg'?

If so, then you can:

Use Single Quotes:
$code = '<?php $msg = get_message(); ?>'

or Escape your $-signs, by placing a backslash(\) in front of the $-sign
$code = "<?php \$msg = get_message(); ?>";


On 5/11/05, Dan Rossi <php@electroteque.org> wrote:
>
> Hi there I am trying to generate a php file, which has variables that i
> need to have in it ie $_SERVER but not actually be parsed as they need
> to be in the actual script. I also need to send some variables to
> assign values to other variables in the script. How is this possible ?
> I have tried placing the contents of the script within a string, but
> all the variables gets parsed, and the super globals cause an error.
> Let me know .
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация