On Wed, May 20, 2009 at 10:45:07AM -0500, Ellen Heitman wrote:

> Hello! I would really appreciate some answers to a few basic questions. I
> have done some research online, but it would greatly help me to get direct
> answers.
> 1. If my site needs to be available to many browsers, including those that
> may not be entirely up-to-date, is PHP a safe option? I mean, I know that
> Flash is something people have to have enabled on their browsers, but I
> thought I read that PHP is available to all recent browsers as long as the
> server the site is hosted on supports PHP. Is this true?

PHP is *server-side* technology, so the browser doesn't matter. The web
server interprets the PHP and sends the result to the browser. That's
why, when you do "Show Page Source" or "Display Page Source" on a PHP
page, you won't see any PHP code, even if it's there.

> 2. How can I preview my PHP while I'm coding? I'm using TextWrangler. I have
> already followed the installation tutorial here:
> http://foundationphp.com/tutorials/php_leopard.php. The test PHP file does
> work in my Safari browser. However, when I try to preview my .php files
> created in TextWrangler with Safari it doesn't work.

TextWrangler is a text *editor*, not a PHP *executor*. The tutorial you
mentioned just sets up your computer so that the Apache web server on it
recognizes PHP code, so as to interpret it.

If you're creating PHP files with TextWrangler, and they're not
displaying properly in Safari, there are a variety of reasons. Are you
putting the files in the right place, according to the tutorial? Are the
permissions on the file correct? Are you putting anything in the files
which would actually echo to the screen? When you say "it doesn't work",
what exactly do you mean?

> 3. I need something that functions as an iframe. I've been reading that
> include() serves this purpose. However, I've found that I have the make the
> content in the "iframe" the main content and call the things around it. I
> want to do the reverse. I want the other content on the main html page in
> place, and just want to call the text in the frame box. Is this doable?

Frames are a creature of HTML, not PHP. So setting this up is as easy as
configuring your HTML page properly. PHP is generally interspersed with
HTML to do the things that PHP can do and HTML can't.

Your questions indicate you don't understand how PHP works, and the way
PHP integrates with HTML. If you don't have a background in programming
in general, you've got quite a bit of work in front of you. I'd suggest
perusing the shelves of the best bookstore in your area for a PHP book
suitable for your level of understanding.


Paul M. Foster

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to