Well, you'll be happy to know it isn't working for me, either--yet. It may
be because I'm lacking some support files, or because some include files
have paths that are defined to reflect a remote site rather than my backup
copy...


On 3/19/06 9:23 AM, "Google Kreme" <[EMAIL PROTECTED]> wrote:

> 
> On 18 Mar 2006, at 16:50 , Kerri wrote:
> 
>> 
>> Allen Watson wrote:
>> 
>>> No one has really addressed the primary question: Why doesn't php
>>> code get
>>> executed when previewing a .php page in BBEdit, but _does_ get
>>> executed when
>>> viewed in a browser with http://localhost/~username/file.path?
>>> 
>>> It seems to me that executing php code is a province of the apache
>>> server I
>>> am running; BBEdit knows nothing about php. So, although I find this
>>> inconvenient, it makes perfect sense to me, and I just save the
>>> file, switch
>>> to the browser, and refresh...I wish it could be easier.
>>> 
>> It is. :-)
>> 
>> Go to Preferences --> HTML Websites. Click the 'Add' button to make
>> a new website project, and set the 'local site root' to the
>> directory where your files are on your hard drive. You'll see, at
>> the bottom, 'Use local preview server'. If you check that box and
>> set it to http://localhost/, it will run your files through your
>> local Apache installation, parsing the PHP (since your local Apache
>> seems configured to parse PHP already) before displaying the result
>> in BBEdit's preview window. AND the live updating still works,
>> which is tres cool.
> 
> I have done this every which way to tuesday and had no luck.  the
> same page that works fine when I load it in Safari does not work in
> BBEdit's preview.  I _always_ get php code displayed inline with the
> HTML.
> 
> I mean, I know it works for other people, because too many say "yes
> that works" but it's never worked for me.
> 
> I feel like a moron every time I bring it up.  The best I can ever
> get is where only the HTML is shown, but even so, when I have a php
> line like:
> 
>   echo "<h5>$id <br> $run <br> $airln<br> $bags <br> $pxn <br>
> $phone<br> $addrs<br> $city <br> $zip <br> $value<br> $tcall<br>
> $ddate<br> $bdo <br> $notes</h5>";
> 
> echo '
> <form action="'.  $_SERVER['PHP_SELF'] .'" method="post">
> 
> 
> In the preview window I get:
> 
> $id
> $run
> $airln
> $bags
> $pxn
> $phone
> $addrs
> $city
> $zip
> $value
> $tcall
> $ddate
> $bdo
> $notes"; echo '
> [Form displays down here]
> 
> I don't get the value of $id, I get, literally, "$id".
> 

-- 
<[EMAIL PROTECTED]>
Scripts for OE and Entourage:
<http://homepage.mac.com/allen_a_watson/AppleScripts_For_You>
Entourage questions: <http://www.entourage.mvps.org/>




-- 
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to