I am turning my PHP/MySQL/jQuery Mobile/Javascript webapp into a app thanks to Phonegap. I want to get rid of all PHP code (except while exchanging data with the server) to feed Phonegap with HTML pages. Data-wise, this is not a problem because views and data accesses were properly separated.
My problem is that I used PHP to apply the DRY principle (any HTML pattern that was repeated was rendered with a PHP function call). Since I will be working on both the webapp and the iPhone app, I need to be able to easily export changes to the page into the Phonegap project.
So I am looking for a way to export the pages of my webapp using some command line function in Eclipse. Ideally I would add builders like this to Eclipse:
php -F htdocs/index.php > phonegapdirectory/index.html
I am obviously missing something because nothing is output. The php command is waiting for direct input and I need to type in exit for the result to be output correctly.
Any idea on how to make it right?
Is there any other good practice exporting PHP to HTML to Phonegap?
Thanks a lot for your help!
Why do you need to use -F? Are you planning on passing input into the php files?
You could just use