我正在使用PHP将php.ini模板化。我有一个脚本,使用CLI PHP脚本从模板生成httpd.conf、apachectl和php.ini来设置开发环境。不幸的是,在php.ini中(在注释中)有文字
目前我的解决方法是将它们包装在一个真正的PHP转义序列中,将它们输出为字符串,就像这样:
<?
和<?php
。有没有可能以某种方式转义它们,使得php不会将其解释为普通的PHP转义序列?目前我的解决方法是将它们包装在一个真正的PHP转义序列中,将它们输出为字符串,就像这样:
; This directive determines whether or not PHP will recognize code between
; <?php echo "<? and ?>" ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php echo "<?php and ?>" ?> tag combination. With the wide spread use
;
<?
吗? - rinogo