Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 06-10-2009, 07:32 AM   #1 (permalink)
Registered User
 
frozenfire03's Avatar
 
Join Date: May 2008
Location: Philippines
Posts: 82
OS: WinXP SP2


Cry Anyone who know much in php?

I want to learn how to create/build website using php language. I've already installed xampp. Now i tried to make some php scripts in NOTEPAD displaying "hello world" for me to test. I save it as example.htm and tried to open it in a browser. But nothing prints.

I used this code

<?php

echo "hello world";

?>

i saved it in desktop usin the extension .htm. But nothing prints in browser.

What should i do? Save it in drive c where php folder located?? Or do i need to change editor from notepad?

Please help me guys
frozenfire03 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 06-10-2009, 08:01 AM   #2 (permalink)
Registered User
 
Join Date: Jun 2009
Location: Ireland
Posts: 12
OS: Vista HP SP1

My System

Re: Anyone who know much in php?

Go to the XAMPP directory, go to the htdocs folder and create a new folder named "test". Now, move the PHP file you created into this folder.

Open your browser (IE/Firefox etc) and go to http://localhost/test/phpfile.php
__________________
Kieran C
WebDesignTuts is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 08:02 AM   #3 (permalink)
Registered User
 
Join Date: Jun 2009
Location: Ireland
Posts: 12
OS: Vista HP SP1

My System

Re: Anyone who know much in php?

<posted twice>
__________________
Kieran C

Last edited by WebDesignTuts; 06-10-2009 at 08:03 AM. Reason: Don't know why this added two posts.......
WebDesignTuts is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 09:48 AM   #4 (permalink)
Registered User
 
neonjuice's Avatar
 
Join Date: Dec 2008
Location: Minnesota
Posts: 113
OS: Vista Ultimate 64 bit SP1. Linux Ubuntu, XP Pro


Re: Anyone who know much in php?

All PHP needs to be saved as .php.
neonjuice is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 11:28 AM   #5 (permalink)
Design Team Member
 
Redcore's Avatar
 
Join Date: Aug 2007
Location: Jamestown, CA
Posts: 715
OS: Linux Mint 7

My System

Re: Anyone who know much in php?

^ Yes.

You can put HTML in PHP files, but not the other way around.
__________________
Free Resources
PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |
Web Design/Programming - KompoZer
(Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting |
Redcore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 04:15 PM   #6 (permalink)
Registered User
 
frozenfire03's Avatar
 
Join Date: May 2008
Location: Philippines
Posts: 82
OS: WinXP SP2


Re: Anyone who know much in php?

Thanks guys. Please check my coding below..

<html>
<head>
<body>

<?php

echo "hello world";

?>

</body>
</html>

i used notepad for coding and save it in c:/xampp/test

using testing.php as filename..
frozenfire03 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 05:28 PM   #7 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,880
OS: Vista, various linux distros


Re: Anyone who know much in php?

Should be under c:/xampp/htdocs/test/

=]

Cheers,
Jamey

edit: then the url you use in your browser should be "http://localhost/test/testing.php"... (Ensuring Apache is running[in the XAMPP control panel])
__________________

Myspace

Last edited by jamiemac2005; 06-10-2009 at 05:29 PM.
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 06:36 PM   #8 (permalink)
Registered User
 
Join Date: Feb 2009
Posts: 5
OS: Vista


Re: Anyone who know much in php?

make sure these are in your apache httpd.conf file and you should be able to put php in html documents

AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
AddType application/x-httpd-php .htm
Arminius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 07:31 PM   #9 (permalink)
Registered User
 
frozenfire03's Avatar
 
Join Date: May 2008
Location: Philippines
Posts: 82
OS: WinXP SP2


Re: Anyone who know much in php?

this is the location where i save my testing.php file

C:\xampp\htdocs\test\testing.php

i follow your instruction carefully, tried it in firefox browser, but this error displays

Not Found

The requested URL /test/hello.php was not found on this server.

any comments guys??
frozenfire03 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-10-2009, 10:31 PM   #10 (permalink)
Registered User
 
frozenfire03's Avatar
 
Join Date: May 2008
Location: Philippines
Posts: 82
OS: WinXP SP2


Re: Anyone who know much in php?

i've done already.. thanks guys.. i restarted the apache service and then it goes..
frozenfire03 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-11-2009, 06:56 AM   #11 (permalink)
Registered User
 
Join Date: Jun 2009
Location: Ireland
Posts: 12
OS: Vista HP SP1

My System

Re: Anyone who know much in php?

Glad you got it going.
__________________
Kieran C
WebDesignTuts is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-11-2009, 02:13 PM   #12 (permalink)
Design Team Member
 
Redcore's Avatar
 
Join Date: Aug 2007
Location: Jamestown, CA
Posts: 715
OS: Linux Mint 7

My System

Re: Anyone who know much in php?

Quote:
Originally Posted by Arminius View Post
make sure these are in your apache httpd.conf file and you should be able to put php in html documents
I'd like to read some opinions on this...I've always been under the impression that it's a bad practice due to compatibility issues (ie: you can't hand it off to someone else without making them do the same thing - and not all hosts are down with changing system files) but I'd like to discuss such a thing...
__________________
Free Resources
PC Protection - Comodo Firewall | AVG Anti-Virus | WinPatrol | Ad-Aware | Spybot S&D | SpywareBlaster |
Web Design/Programming - KompoZer
(Editor) | Paint.NET (Graphic) | GIMP+GIMPShop (Graphic) | FileZilla (FTP Client) | Free Hosting |
Redcore is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-11-2009, 06:05 PM   #13 (permalink)
Registered User
 
frozenfire03's Avatar
 
Join Date: May 2008
Location: Philippines
Posts: 82
OS: WinXP SP2


Re: Anyone who know much in php?

I have some query here guys, is there a way to embed php script to a j2me application <java>?

Ie: you wan to connect that application via http connection?
frozenfire03 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 06-12-2009, 10:16 AM   #14 (permalink)
Registered User
 
Join Date: Feb 2009
Posts: 5
OS: Vista


Grin Re: Anyone who know much in php?

Quote:
I'd like to read some opinions on this...I've always been under the impression that it's a bad practice due to compatibility issues (ie: you can't hand it off to someone else without making them do the same thing - and not all hosts are down with changing system files) but I'd like to discuss such a thing...
This is true. Another downside is that all the HTML files now have to go through the PHP engine for processing which causes a slight drop in performance. I prefer working with HTML over PHP files. Why? I have no idea, I guess its just the appearance.
Arminius is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 01:14 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85