English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi everyone,iam new to programming.Iam learning html and php on my own using a book.I have written php program in a notepad and saved it with a extention php.Now,i don't know how to open this file using a web browser.Do we have to use any URL to open?Also tell me how to open html file which i saved in notepad using the extension html.

Thank u.

2007-11-08 19:46:25 · 5 answers · asked by Anonymous in Computers & Internet Programming & Design

5 answers

I would suggest installing XAMPP. It is a package that includes Apache, PHP, Perl, and a few other services.. With that installed you will have a fully functional web server that you can use to test your code.. After you have installed XAMPP, save your .php files to the \xampp\htdocs directory. Then you can open them by typing http://localhost/test.php as an example where test.php is your php file.

In order to open a .html file in notepad you can either open notepad from the start menu, click file, open, and browse to the .html file you want to open, or (while holding the CTRL button) right click on the html file and select "Open With..." then select Notepad from the list.

EDIT: I misunderstood the 2nd part of your question.. To open an html file saved in notepad simply double-click on it and it should open in your default web browser.
And did I mention installing XAMPP is a breeze compared to manually installing Apache and PHP. It does all the work and configuration for you. And it's free!

2007-11-08 19:59:24 · answer #1 · answered by Anonymous · 0 0

You need to have a web server, you can download several distributions of Apache which include php and the mysql database servers. To save the files from notepad, always set the extension manually to .html or .php and then select the type of file to all files.

2007-11-08 20:17:09 · answer #2 · answered by Anonymous · 0 0

Php doesn't run without a server. I can explain you myself but, you better have a look on

http://www.w3schools.com/php/php_install.asp

You will get links to all programs you need to install in order to run php.

html is easier to run. Just save a notepad file as ".html" format and open it using internet explorer.

2007-11-08 20:02:50 · answer #3 · answered by Violet hill 4 · 0 0

Don't get entangled with installing any web server on your machine! Setting up PhP can take you more than a week if you have no experience...
- Get a domain and a server (many are free).
- Get an FTP program (to upload your files)
- Make your PhP code as "index.php"
- UPLOAD your PhP code to the server.
- Open your browser
- Call your page: http://www.mydomain.com
This will show (by default) your index.php page
Et voilà...

2007-11-08 22:09:29 · answer #4 · answered by just "JR" 7 · 0 1

You should be able to just double click on the file to open it in Internet Explorer.

http://www.fileinfo.net/extension/php
http://www.fileinfo.net/extension/html

2007-11-08 20:00:01 · answer #5 · answered by HappyStarz 5 · 0 0

fedest.com, questions and answers