Re: WebView dealing with PHP
Re: WebView dealing with PHP
- Subject: Re: WebView dealing with PHP
- From: Oli Donald <email@hidden>
- Date: Sun, 4 Jan 2004 04:47:23 +0000
Thanks to all!
I was aware it was a server side preprocessor but I forgot that a
loaded file doesn't make the nescessary (ie any) 'requests' ;)
I'm writing an app that allows you to edit HTML with a live preview,
using a split-view and WebKit. You can download a fully functional (but
not very featured-rich) beta here:
http://www.widosm.com/apps/WebEdit.zip
I would like to get php working...hopefully invoking PHP myself wont be
too slow!
Cheers all,
Oli
On 4 Jan 2004, at 03:44, Phillip Hutchings wrote:
On 4/01/2004, at 3:53 PM, Oli Donald wrote:
Last question for tonight :)
When my WebView loads a php file via
'http://localhost/~user/index.php', it renders perfectly, but when I
load the same file via a file reference (using NSURL
fileURLWithPath:) it doesn't render the PHP at all. Is there
something special I need to do in order for php to be correctly
rendered in my WebViews when the source is a file? I do have both php
and websharing enabled.
Yes, you need to run it through the web server, by requesting it via
HTTP ;)
PHP is a server-side technology, the web server processes it when the
file is requested. All the client ever sees is the processed page.
Hence, if you open it through the file system, bypassing the
webserver, you'll see the PHP code.
There is a command line PHP interpreter, I'm not sure if OS X has it
though. Type php in the terminal.
--
Phillip Hutchings
email@hidden
http://www.sitharus.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.