• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WebView dealing with PHP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Warning when using NSSplitView (From: Oli Donald <email@hidden>)
 >Re: Warning when using NSSplitView (From: j o a r <email@hidden>)
 >WebView dealing with PHP (From: Oli Donald <email@hidden>)
 >Re: WebView dealing with PHP (From: Phillip Hutchings <email@hidden>)

  • Prev by Date: NSImage drawing woes
  • Next by Date: Re: NSImage drawing woes
  • Previous by thread: Re: WebView dealing with PHP
  • Next by thread: Re: WebView dealing with PHP
  • Index(es):
    • Date
    • Thread