473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

begining - tutorial

hi,

i need to begin in php. is there any tutorial to begin? (i started an
hour ago .....)

i copied this first example

<html>
<head>
<titleHello World </title>
</head>
<body>

Hello, world!

<?php

echo 'This is my first PHP web page.';

?>

</body>
</html>

and saved as .html file, and when i open it with the browser, it
appears only the html part, but not php ....

tks in advance

Jun 13 '07 #1
8 1338
On Jun 13, 6:28 am, rhXX <rh00...@gmail.comwrote:
hi,

i need to begin in php. is there any tutorial to begin? (i started an
hour ago .....)

i copied this first example

<html>
<head>
<titleHello World </title>
</head>
<body>

Hello, world!

<?php

echo 'This is my first PHP web page.';

?>

</body>
</html>

and saved as .html file, and when i open it with the browser, it
appears only the html part, but not php ....

tks in advance

Your local bookstore has an awesome section entitled "Computers -
Programming". It might go by the sneaky name of "Computing -
Programming Languages", or something tricky like that.

Seriously, go down there and pick out any introductory book about
php. I started with Sam's Teach Yourself PHP. You will run through
the basics, and then you can ask more interesting questions.

Jun 13 '07 #2
On Jun 13, 5:01 pm, e_matt...@hotmail.com wrote:
On Jun 13, 6:28 am, rhXX <rh00...@gmail.comwrote:
hi,
i need to begin in php. is there any tutorial to begin? (i started an
hour ago .....)
i copied this first example
<html>
<head>
<titleHello World </title>
</head>
<body>
Hello, world!
<?php
echo 'This is my first PHP web page.';
?>
</body>
</html>
and saved as .html file, and when i open it with the browser, it
appears only the html part, but not php ....
tks in advance

Your local bookstore has an awesome section entitled "Computers -
Programming". It might go by the sneaky name of "Computing -
Programming Languages", or something tricky like that.

Seriously, go down there and pick out any introductory book about
php. I started with Sam's Teach Yourself PHP. You will run through
the basics, and then you can ask more interesting questions.
:-)))) tks!

Jun 13 '07 #3
Message-ID: <11**********************@o11g2000prd.googlegroups .comfrom
rhXX contained the following:
>and saved as .html file, and when i open it with the browser, it
appears only the html part, but not php ....

Try saving it as a .php file :-)

I take it you are uploading it to a server?

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jun 13 '07 #4
rhXX wrote:
hi,

i need to begin in php. is there any tutorial to begin? (i started an
hour ago .....)

i copied this first example

<html>
<head>
<titleHello World </title>
</head>
<body>

Hello, world!

<?php

echo 'This is my first PHP web page.';

?>

</body>
</html>

and saved as .html file, and when i open it with the browser, it
appears only the html part, but not php ....
Not entirely true.
Check the source of the html page, and you find the php-part in there just
fine. It only didn't execute. :)

The problem with your approach is that you need PHP to actually run.
Just throwing it into a browser as a html-file will not do.
You need PHP installed on a server (can be your own machine), and tell your
webserver (Apache/IIS/whatever) that it should use PHP for all requests
that end with .php (.html is NOT a smart idea).

That asside, I tink e_matthes gave you a better answer: Just get a good
book.
I prefer books from O'Reilly, but that is a matter of taste.

Regards,
Erwin Moller
>
tks in advance
Jun 13 '07 #5
Try saving it as a .php file :-)
I take it you are uploading it to a server?

--
Geoff Berrow (put thecat out to email)

Check the source of the html page, and you find the php-part in there just
fine. It only didn't execute. :)
EXACTLY
The problem with your approach is that you need PHP to actually run.
Just throwing it into a browser as a html-file will not do.
You need PHP installed on a server (can be your own machine), and tell your
webserver (Apache/IIS/whatever) that it should use PHP for all requests
that end with .php (.html is NOT a smart idea).

That asside, I tink e_matthes gave you a better answer: Just get a good
book.
I prefer books from O'Reilly, but that is a matter of taste.

Regards,
Erwin Moller
ok, perfect! it worked fine with .php
the tutorial i found, talked about php code inside html code, only,
without precising where it is processed! i thinked that is processing
in the browser .... now seeing both sources i understood the
difference!

sincerely, tks a lot!!!!!!!!!
Jun 13 '07 #6
"rhXX" <rh*****@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
hi,

i need to begin in php. is there any tutorial to begin? (i started an
hour ago .....)
http://www.w3schools.com/php

D.
--
googlegroups /dev/nul
Jun 13 '07 #7
http://www.w3schools.com/php
D.
googlegroups /dev/nul
tks!!!

Jun 13 '07 #8
In our last episode,
<11**********************@o11g2000prd.googlegroups .com>, the lovely and
talented rhXX broadcast on comp.lang.php:
hi,
i need to begin in php. is there any tutorial to begin? (i started an
hour ago .....)
i copied this first example
><html>
<head>
<titleHello World </title>
</head>
<body>
Hello, world!
><?php
echo 'This is my first PHP web page.';
?>
></body>
</html>
and saved as .html file, and when i open it with the browser, it
appears only the html part, but not php ....
tks in advance
Browsers should ignore stuff in angle brackets that cannot be identified as
HTML elements. And php is not HTML. PHP is a preprocessor language (among
other things). See: "pre" + "processor." Something has to process it. That
something can be a web SERVER (not a browser) if the server has a php module
and is properly configured. Or it can be php at the command line. You
don't really have an .html document. It is a .php document. It is the
processing that changes it into html that can be rendered by browsers. I am
pretty sure some browsers can be configured to use php (if it is installed)
to preprocess a document before it renders it, but that will often require a
dummy server environment and the browser will have to know the document is
supposed to be php, which it won't when it views the document as a file and
the extension is not .php.

1) Have you installed php on your system?
2) Do you have a web server with a php module?

If the answer is no to both questions, then you are not in the php business.
If 1) is yes, I suggest you start reading the documentation that came with
it.

If you just want to see what is in the document, use view source in your
browser.

--
Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner>
Countdown: 586 days to go.
Why "War Czar"? That sounds like Imperial Russia!
Call it by the American term: "Fall Guy."
Jun 13 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rhino | last post by:
Can anyone point me to a good free XSLT Tutorial online? I looked for some a few months ago and didn't find anything very good. I'm hoping some of the experts here can point me to a good XSLT...
15
by: binnyva | last post by:
Hello Everyone, I have just compleated a JavaScript tutorial and publishing the draft(or the beta version, as I like to call it) for review. This is not open to public yet. The Tutorial is...
4
by: Minitman | last post by:
I have an address database and I want to have the query prompt for me to enter an expression that will bring up ALL names begining with same first ltr for individual page on my report. I am...
11
by: Magnus Lycka | last post by:
While the official Python Tutorial has served its purpose well, keeping it up to date is hardly anyones top priority, and there are others who passionately create really good Python tutorials on...
7
by: Adrian | last post by:
Why does std::strings find search from the begining of the string when pos >= (std::string::npos-3) I cant find anything in the standard that says what find should do if pos==npos in find I...
1
by: James Yang | last post by:
Sirs, We are using DB2 UDB 8.2.5 for AIX 5.3. Everytime when we perform a online incremental backup to Tivoli, the system will hang for about 10 mins or more at the begining of backup due to no...
5
by: plsHelpMe | last post by:
Hi Frens, I want to show a blank space at the begining of the option tag using javascript, can anyone please help me for the same. Let me explain what i want: I want to have an event which the...
1
by: geblex | last post by:
Hi , I'm still newbie Anyone can help me for putting date into a file which grep from other file? I use sed command but it gets error since the date format determine as a command. Here is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.