Hi all,
First off, a big thanks for this software, it's a fantastic tool. I've been using it with Rails and am very happy with it. I'm starting to now experiment with it in PHP (via XAMPP) and have run into a problem.
Getting Prince together, I can create a PDF of a document without troubles; within a PHP block I can instansiate a $prince object by referenceing Prince.php and later get it to create a PDF of the page itself.
However, when the HTML document includes a <?php ... ?> tag, it gets ignored instead of being processed by PHP. To illustrate:
returns:
It's fine in the browser so I'm assuming that Prince's rendering isn't calling Apache/PHP to provide the code but an internal processor? I'm confused by this as with Rails I've been happily using in the same way, just variables -- <%=h @variable %> -- and such.
I've seen many posts about getting a PHP block to talk to Prince, but my problem is the other way round, Prince isn't talking with my webserver/PHP!
Thanks for any help, I don't mind further questions at all!
First off, a big thanks for this software, it's a fantastic tool. I've been using it with Rails and am very happy with it. I'm starting to now experiment with it in PHP (via XAMPP) and have run into a problem.
Getting Prince together, I can create a PDF of a document without troubles; within a PHP block I can instansiate a $prince object by referenceing Prince.php and later get it to create a PDF of the page itself.
However, when the HTML document includes a <?php ... ?> tag, it gets ignored instead of being processed by PHP. To illustrate:
<h1>Hello! I'm <?php $title='PHPrince' ; echo $title ?>!</h1>
returns:
<h1>Hello! I'm !</h1>
It's fine in the browser so I'm assuming that Prince's rendering isn't calling Apache/PHP to provide the code but an internal processor? I'm confused by this as with Rails I've been happily using in the same way, just variables -- <%=h @variable %> -- and such.
I've seen many posts about getting a PHP block to talk to Prince, but my problem is the other way round, Prince isn't talking with my webserver/PHP!
Thanks for any help, I don't mind further questions at all!
Edited by seawolf