![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| 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: * 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 |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2008
Location: Philippines
Posts: 82
OS: WinXP SP2
|
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 |
|
|
|
| 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 |
|
|
#2 (permalink) |
|
Registered User
|
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 |
|
|
|
|
|
#5 (permalink) |
|
Design Team Member
|
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 | |
|
|
|
|
|
#6 (permalink) |
|
Registered User
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.. |
|
|
|
|
|
#7 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,853
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]) Last edited by jamiemac2005; 06-10-2009 at 05:29 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 |
|
|
|
|
|
#9 (permalink) |
|
Registered User
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?? |
|
|
|
|
|
#12 (permalink) |
|
Design Team Member
|
Re: Anyone who know much in php?
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 | |
|
|
|
|
|
#13 (permalink) |
|
Registered User
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? |
|
|
|
|
|
#14 (permalink) | |
|
Registered User
Join Date: Feb 2009
Posts: 5
OS: Vista
|
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
|
|