NominalAeon
NominalAeon

Reputation: 604

How can I view a PHP file without having to upload it to my ftp?

This is probably embarrassing short-sighted or just completely wrong, but I've made a header.php and a footer.php file and then an index.php file that calls them. Is there a way to view that index.php file from my desktop?

Upvotes: 0

Views: 109

Answers (5)

Techie
Techie

Reputation: 45124

If you are on windows use WAMP If you are on mac use MAMP. For linux use XAMPP Plus read this How Web Servers Work

Upvotes: 1

Daryl Gill
Daryl Gill

Reputation: 5524

Use an Apache Server:

XAMPP - http://www.apachefriends.org/en/xampp.html

This will install MySQL, PHPMYADMIN, Apache, PHP on your computer, so you can just upload files to

C:\xampp\htdocs\

and browse to :

127.0.0.1 OR localhost

via a browser with Apache Service running.

^ Assumes you are on Windows.

Another assumption if you was on a linux box (Ubuntu For example)

http://www.howtoforge.com/ubuntu_lamp_for_newbies

Upvotes: 1

Mike Brant
Mike Brant

Reputation: 71422

You would need to install a web server/PHP stack on your desktop. You could looks at something like WAMP (for windows) or MAMP (for Mac) to do this. Or if you happen to be using Linux just install Apache and PHP directly on your machine.

Upvotes: 1

Quentin
Quentin

Reputation: 944321

Install a webserver with support for PHP on your desktop.

Apache is a good choice. There are bundles of Apache + PHP available for most operating systems.

Upvotes: 1

Stefan
Stefan

Reputation: 2204

Use local webserver stack like XAMPP
This will allow you to view PHP Pages without having to upload them to your Server

Upvotes: 3

Related Questions