Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Processing PHP In WebView

Processing PHP In WebView
Thread Tools
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Aug 8, 2004, 03:23 PM
 
Hi guys,

I have a Live Preview feature in my app that I'm rewriting to accommodate PHP processing.

Basically, right now, I feed a string of all the text in my NSTextView to the WebView. The problem with this is, any server-side languages fed into the WebView will not be processed.

So, my question is, what would be the best method to make PHP execution possible. My idea was to save the contents of the NSTextView to a file somewhere (/tmp most probably), then feed that into the PHP engine (built into OS X), which should then spit out the executed code which I can then feed to the original WebView.

My only gripe with this is, I have a setting where you can update the preview everytime you type, so I'm worried that saving to this file, and passing it off to PHP everytime is going to cause some major performance issues.

Any ideas?

Thanks,
Oliver
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Aug 8, 2004, 03:37 PM
 
Why not invoke the php command directly?
     
Grizzled Veteran
Join Date: Jun 2002
Status: Offline
Reply With Quote
Aug 8, 2004, 04:32 PM
 
Originally posted by Angus_D:
Why not invoke the php command directly?
To be honest, I've never used the php cli tool. Can you send strings to it?

Thanks,
Oliver
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:07 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2