Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 19th, 2007, 12:39 AM   #1
kishou
Programmer
 
Join Date: May 2007
Posts: 52
Rep Power: 2 kishou is on a distinguished road
help!

ok why can't i see the text???
kishou is offline   Reply With Quote
Old Jun 19th, 2007, 2:50 AM   #2
grimpirate
King of Portal
 
grimpirate's Avatar
 
Join Date: Sep 2005
Posts: 403
Rep Power: 3 grimpirate is on a distinguished road
Send a message via Yahoo to grimpirate
First off when you save a php file you have to make the extension ".php" not ".html". Secondly, in order to produce output to the browser you have to use the "echo" instruction. So something like "echo $txt;" or "echo $number;" I suggest you read some beginners tutorials or purchase a book on the subject which will be far more productive than just trying to wing it. http://www.w3schools.com has some simple php tutorials.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis
grimpirate is offline   Reply With Quote
Old Jun 19th, 2007, 3:03 AM   #3
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: olympia,WA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
here are 13 videos covering many topics in php. watch and learn
http://www.phpvideotutorials.com/
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Jun 19th, 2007, 6:41 AM   #4
Alexunder
Newbie
 
Join Date: Jun 2007
Posts: 9
Rep Power: 0 Alexunder is on a distinguished road
Just code:
echo $txt;
or <?=$txt?>
Alexunder is offline   Reply With Quote
Old Jun 19th, 2007, 1:11 PM   #5
kishou
Programmer
 
Join Date: May 2007
Posts: 52
Rep Power: 2 kishou is on a distinguished road
Quote:
Originally Posted by grimpirate View Post
First off when you save a php file you have to make the extension ".php" not ".html". Secondly, in order to produce output to the browser you have to use the "echo" instruction. So something like "echo $txt;" or "echo $number;" I suggest you read some beginners tutorials or purchase a book on the subject which will be far more productive than just trying to wing it. http://www.w3schools.com has some simple php tutorials.
ok i saved it as a .php file and i still can't see anything. and i got tht code form that website you provided.
kishou is offline   Reply With Quote
Old Jun 19th, 2007, 2:20 PM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
check the apache error logs...

tail -f /var/log/httpd/error_log

Then run that file in your browser.

(assuming your logs are stored in /var/log/httpd)
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Jun 19th, 2007, 7:22 PM   #7
tAK
Programmer
 
Join Date: Mar 2007
Posts: 33
Rep Power: 0 tAK is on a distinguished road
And yet no one stated the other obvious.

you cannot just open the .php file in your browser.. you have to install a local webserver, or sign up for a free online host that supports PHP !

The php video tutorials posted earlier have a rough run down in getting XAMPP running for testing on (i think)
tAK is offline   Reply With Quote
Old Jun 19th, 2007, 9:45 PM   #8
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Download Apache. Read the instruction on how to install it. Then install PHP. Read the instruction on how to install it.

If my instructions confuse you which I will assume. Read this:
http://www.thesitewizard.com/archive/php4install.shtml
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jun 20th, 2007, 9:07 AM   #9
Alexunder
Newbie
 
Join Date: Jun 2007
Posts: 9
Rep Power: 0 Alexunder is on a distinguished road
Oh This is how it worx:
User -> Apache -> file -> if php -> php preprocessor -> Apache -> User

So you must setup Apache or other server that worx with php fnd then setup Php. configure it. And only then it will work.

For first time you may use phptriad2.X.X I forget version. Use google to find it.
Alexunder is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:35 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC