bradcathey has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monasterians,
I have a simple content manager that uses the expected Perl/MySQL/HTML::Template in relative harmony. However, rolling my own wysiwyg editor has proven monumental, so I've decided to use WysiwygPro editor.
It's a powerful editor, but requires a php file to fire it up. Not a problem, until it comes to passing the content-to-edit from my Perl/MySQL routines to the .php. Three possibilities come to mind:1) Learn PHP and handle the MySQL from within the .php, bypassing Perl altogether. Update: drats, security issues trying to avoid hardcoding the DBI log-on info.
2) From within Perl, fetch and print the content to a temporary text file on the server, and then use php within the .php file to retrieve and assign it accordingly. Seems goofy.
3) Print my .php as a heredoc, populating it from within my Perl script. Update: Can't seem to get this to work. Maybe it's not possible to print a .php file to screen.
The 1st and 3rd options seem best, the first being the cleanest, learning enough PHP to do the work, notwithstanding.
Of course, it would be great to have something like PHP::Template (maybe there is something like it), but in the meantime, what's the monastery's take on this? Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Starting a PHP file from Perl
by b10m (Vicar) on Nov 13, 2004 at 21:22 UTC | |
by bradcathey (Prior) on Nov 13, 2004 at 23:34 UTC | |
|
Re: Starting a PHP file from Perl
by TedPride (Priest) on Nov 13, 2004 at 20:04 UTC | |
|
Re: Starting a PHP file from Perl
by Jaap (Curate) on Nov 14, 2004 at 10:29 UTC | |
by bradcathey (Prior) on Nov 14, 2004 at 13:39 UTC |