• 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: Phillip Hutchings <email@hidden>
  • Date: Sun, 4 Jan 2004 16:44:39 +1300

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.

  • Follow-Ups:
    • Re: WebView dealing with PHP
      • From: Oli Donald <email@hidden>
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>)

  • Prev by Date: Re: Controller Question
  • Next by Date: Re: WebView dealing with PHP
  • Previous by thread: WebView dealing with PHP
  • Next by thread: Re: WebView dealing with PHP
  • Index(es):
    • Date
    • Thread