Reply to Re: WAMP5, short tags and CLI PHP issue

Your name:

Reply:


Posted by Steve on 01/29/07 14:45

"comp.lang.php" <phillip.s.powell@gmail.com> wrote in message
news:1170079350.729027.92780@j27g2000cwj.googlegroups.com...
|I installed WAMP5 on my WinXP box which works just fine on its own,
| and I found a practical way of handling my short-tag PHP script
| via .htaccess:
|
| php_flag short_open_tag on
|
| To ensure my literally hundreds of PHP scripts will all function
| within the WAMP5 architecture.
|
| However, there is a case of a series of installer scripts written in
| PHP that are not meant to be run except as CLI PHP that obviously will
| not benefit from .htaccess, furthermore, changing the CLI PHP scripts
| from short to long tags is very much not an option due to both the
| volume of scripts and code complexity as patterns of '<' . '?..' or
| "<" . "?.." or '<' . "?.." will exist within scripts alongside the
| dynamic generation of other PHP scripts by other CLI PHP scripts.

volume is not important, nor is the pattern complex. you will either look
for:

<?

or

<?=

i'd suggest making a script that recurses your directory structure that does
a regex replace on all the files where that pattern matches. i'd have made a
backup of all the files first, then after having done the replacements,
attempt to install it on a test computer and bang on its functionality until
you are satisfied everything is working properly.

this is where foresight would have come in handy...although i usually don't
fuss to much about short-tagging as, like i have suggested, the fix is
painfully easy.

hth,

me

[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

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