Jump to content

view index.php file from my machine?


Recommended Posts

my method now is to write index.html with php code snippets in notepad, view html/css changes in ie (php doesn't show), ftp to godaddy server, rename index.php, php appears on website.

 

i've downloaded/extracted php 5 and apache 2.2.6, rename file index.php, but when opening that file get quickly small, flashing/disappearing black dialogue box (like safe mode).

 

(also unable to see js code snippets previewing in ie--but that's not as important now)

 

surely people view changes in their browser immediately using php/js instead of having to upload to host-server then edit?

 

thanks, this is huge!

Link to comment
Share on other sites

For that you'll need to install Apache and PHP on your computer (MySQL would be a good idea as well). A combination of Windows, Apache, PHP and MySQL is abbreviated WAMP. Similarly is Apache, PHP and MySQL on Linux called LAMP. You can choose to install a WAMP software bundle yourself by installing the individual components manually or you can choose a packaged solution which will install everything for you. A popular one seems to be xampp but there is a comparison of some WAMPs here: http://en.wikipedia.org/wiki/Comparison_of_WAMPs

 

When you have that installed you'll place your PHP file within a folder called the "document root" and then you can access it by going to http://localhost or http://127.0.0.1. The document root can differ. It can be something like C:\apache2\htdocs on Windows and /home/user/public_html or /var/www on Linux. If you choose a packaged solution consult the readme file or documentation for more detailed information.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.