You are here: Re: How to display files in a directory? « HTML « IT news, forums, messages
Re: How to display files in a directory?

Posted by Greg N. on 11/16/83 11:38

Ralph Höglund wrote:

> It is only the general environment that must be
> properly set that I dont know so much about yet.

I'm not sure what the problem is, so I'll give you a very simple example:

A html page, let's call it "sample.html", may look like this:

<html><body>
<p>hello world
</body></html>

To get the _same_ output under PHP, you only need to change the file
type to "php". Hence, the file name will be "sample.php". There is
nothing in terms of a special environment that you need, other than a
server that supports PHP.

Now, the example above named "sample.php" works under PHP, but it does
not use any of PHP's language features yet. To use the language, you
have to surround the PHP parts of your code with a pair of special
delimiters: "<?php" and "?>".

<html><body>
<?php
echo '<p>hello world';
?>
</body></html>

You may use any number of PHP code blocks on a page, or you may write
the whole page in PHP:

<?php
echo '<html><body>';
echo '<p>hello world';
echo '</body></html>';
?>

That's all there is to it. Of course, there is more to PHP than just
the ECHO element. Go learn :) .

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация