For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > April 2005 > Newcomer









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Newcomer
Barry Fawthrop

2005-04-27, 3:58 pm

Hi All

As a newcomer to the list and PHP, I was wondering:
I have been programming for 8 years now, in C and mostly in Delphi / Pascal.
I am used to the C constraint and syntax, which it appears that PHP follows.

1) Are there any good tutorials, that will take a programmer (like
myself) and
expose them to the PHP specifics? So far I have come across PHP tutorials
but for novices who don't know programming.

2) I have developed many ISAPI apps using Delphi, which are web based apps
How secure is your code when a .php file is called via a web browser? Can
visitors see your code or is it all hidden for them and they just see
the HTML
results?


Thanks in advance

Barry


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 4/25/2005
Jason Barnett

2005-04-27, 8:57 pm

Barry Fawthrop wrote:
> Hi All
>
> As a newcomer to the list and PHP, I was wondering:
> I have been programming for 8 years now, in C and mostly in Delphi /
> Pascal.
> I am used to the C constraint and syntax, which it appears that PHP
> follows.
>


Pretty much. There are very, very few cases where C function !== PHP
function. Oh, and all PHP variables are structs with multiple
"equivalent" properties for string, float, etc.

> 1) Are there any good tutorials, that will take a programmer (like
> myself) and
> expose them to the PHP specifics? So far I have come across PHP tutorials
> but for novices who don't know programming.
>


php.net manual is the best way to go. Zend.com has some advanced
tutorials (and they pretty much support PHP as well). Either that or
ask your question here on the list.

> 2) I have developed many ISAPI apps using Delphi, which are web based apps
> How secure is your code when a .php file is called via a web browser? Can
> visitors see your code or is it all hidden for them and they just see
> the HTML
> results?
>


<?php

/** Code that is in between here is not usually visible to web browsers.
Rather this is used to generate HTML markup, or XML, or whatever. The
exception to this is if your server is configured to show the source
with (for example) .phps files, but by default .php files produce markup
only. */

phpinfo();

/** The above command will dump your system information */

?>

>
> Thanks in advance
>
> Barry
>
>

Michael

2005-04-28, 3:59 pm

Jason, I think your last answer is misleading, PHP does not by default
produce markup unless you choose to output or produce markup with PHP. You
can use PHP to return raw data, manipulate data in a data store etc. etc.
without producing any markup at all. Infact it is not good web development
practice to have PHP produce / generate much or any markup at all (unless
you are working on a small website that will not change much).

O'Reilly.com has some excellent tutorials, again Zend also has some great
beginner and advanced tutorials.

Jason Barnett writes:

> Barry Fawthrop wrote:
>
> Pretty much. There are very, very few cases where C function !== PHP
> function. Oh, and all PHP variables are structs with multiple
> "equivalent" properties for string, float, etc.
>
>
> php.net manual is the best way to go. Zend.com has some advanced
> tutorials (and they pretty much support PHP as well). Either that or ask
> your question here on the list.
>
>
> <?php
>
> /** Code that is in between here is not usually visible to web browsers.
> Rather this is used to generate HTML markup, or XML, or whatever. The
> exception to this is if your server is configured to show the source with
> (for example) .phps files, but by default .php files produce markup only.
> */
>
> phpinfo();
>
> /** The above command will dump your system information */
>
> ?>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


Jason Barnett

2005-04-28, 3:59 pm

Please do not CC me, just write to the list. I will usually see responses.

Michael wrote:
> Jason, I think your last answer is misleading, PHP does not by default
> produce markup unless you choose to output or produce markup with PHP.
> You can use PHP to return raw data, manipulate data in a data store etc.
> etc. without producing any markup at all. Infact it is not good web


Very true.

> development practice to have PHP produce / generate much or any markup
> at all (unless you are working on a small website that will not change
> much).


Not quite sure I agree with this statement though; perhaps you can
explain better what you mean. There are a lot of times that I use PHP
to filter out HTML markup so that I can make sure some fool hasn't
managed to stick some evil Javascript in to my database. Or I use PHP
to generate an XML tree for <insert many good reasons here>.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com