|
#9
| ||||
| ||||
|
elander...obviously safari is not capable of rendering php on its own. What i was saying is that somehow I had safari open php files directly and use the php module to render. And pls dont tell my I am not remembering properly. The whole reason I made this post was cuz I KNOW i was doing this, and tried to see if anyone knew how to do this.
|
|
#10
| |||
| |||
| Something close perhaps...
Here is a link to a page describing one way of previewing php code in the browser: http://tinyurl.com/dkg5e This is as close as I can come to what you're looking for. I've never heard of a way to route php through the php parser via the file:-protocol as you (andehlu) suggest in your post. I haven't ever heard of a plugin that would let you do it either, and I have searched pretty hard for it. [EDIT] Maybe you could try this: use terminal to send the document to php, and pipe the result to Safari? Maybe use a droplet (AppleScript or Automator perhaps) to do it for you? [/EDIT] As for not telling you your memory is deceiving you: I've been working with php for almost eight years now (since the betas of PHP/FI 2.0), and I've never even heard of anything remotely similar to what you describe. I've consulted with a bunch of colleagues on the matter also, and I'm afraid they all come down on my side of the fence... However, it is entirely feasible to create a plugin for Safari that will do what you want. If you really think it is worth it, you might want to try that. Last edited by elander; June 18th, 2005 at 10:26 AM. Reason: A thought... |
|
#11
| ||||
| ||||
|
I was using the Server Logistics binaries of apache/php/mysql when I was able to do this..... does anyone run these binaries still that could test this?
|
|
#12
| |||
| |||
|
You can do "PHP filename.php" on the command line to have PHP parse the script properly. You'd have to either output that to a file or pipe it to the browser... not sure how to do that in OS X just yet. Some editors probably do this (BBEdit doesn't though). Directly accessing a PHP script from any browser will just result in the text of the file in the web browser. Browsers only understand the client-side aspects of a page, not the server-side scripts. (Unless, like someone mentioned, there's a plugin or something that does the parsing for it.) Regardless of which PHP package is installed, the only way to get Apache to parse and serve the PHP scripts to the browser is to access the page using http:// which would require going either through localhost or a virtual host setup to point to the folder that contains the files. Any reference using file:// does not go through the web server.
__________________ Mac Software by Me - ImageReel, Google Maps Address Book Plugin. |
|
#13
| ||||
| ||||
|
First of all, browsers don't "execute" php... ever. the Apache web server and PHP engine work together to do that. By accessing the file directly from the filesystem you are skipping Apache... thus no execution and rendering. Yes there are tricks to execute the code, but why %^#$%^ bother? Why not just make your life 10,000% easier and run it through Apache via http://localhost/ or http://127.0.0.1/ ?
__________________ TommyWillB Intel iMac "early 2006" core duo TommyWillB.com hosted on Mac OS X 10.5.x / Apache 2.2.x / PHP 5.x |
![]() |
| Bookmarks |
| Thread Tools | |
|
|