Reply to a regular expression for detecting PHP commands in a template?

Your name:

Reply:


Posted by lawrence k on 05/19/06 00:09

I'm away from my home computer, where I have a copy of RegEx Buddy that
might let me figure this out on my own.

I've edited the php.ini file on my server so PHP the only way to start
a PHP tag is <?php

I've got a system in place that keeps each PHP function in its own
file, with the file having the same name as the function. Functions are
only imported when they are needed. Before a template is evaluated,
I've got a script that looks through it for every PHP command and
imports it. The script can handle this:

<h2>All weblog entries</h2>
<?php showAllWeblogEntries(); ?>

But I have been unable to think of the regex expression that would
allow me to find PHP functions used as parameters to PHP functions. I
don't know how to capture the parameter here:

<?php makeThumbnailImage(showCurrentImage()); ?>

Any ideas?

[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

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