Jump to content

show index.php & edits from my machine?


paulmo

Recommended Posts

my method now is to write index.html with php code snippets in notepad, view html/css changes only in ie (php doesn't show), ftp to 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

What you do is install the software on your computer, and once you do that you will find that apache has a specific directory the file needs to be under. once you install both apache/php/mysql, you can type in http://localhost/ into any internet browser and you'll be able to see it as if it were on the internet. The little black box is coming up because PHP is a command interpreter(essentially), so it's just told to open the files with .php in it and parse it(like how C++ is run through some other interpreter and then executed). Once you set it up, you'll be able to view the files through the localhost. If you want something to do it for you, then go to http://apache2triad.net/ (one of many websites that offers a service like this).By the way, don't use notepad for PHP. In the beginning its fine, but later on it becomes ######. I use Crimson Editor, just google the name(don't remember the website).

Link to comment
Share on other sites

thanks for these replies--if i'm following right, working with wamp would mean having to create database tables (mysql or lite), so does that mean creating/copying other database tables to host-server? import tables? also does using wamp let js appear too? are most of you using wamp because your machine is host server?i'm not writing php, just using some scripts--sometimes what appears on my machine isn't what shows when uploading, so to see for real would be good. probably will use it all at some point.thanks--

Link to comment
Share on other sites

working with wamp would mean having to create database tables (mysql or lite), so does that mean creating/copying other database tables to host-server? import tables?
If your PHP application does not use databases, then there is no need to worry about them.
also does using wamp let js appear too?
Err... JS code will be executed.
are most of you using wamp because your machine is host server?
I use WAMP as just a test server, but if yoru ISP doesn't block port 80 then you can allow remote access to your site on your machine.
Link to comment
Share on other sites

i'm using 1 php script that with database so would have to build/import that table in mysql on my machine to see locally?

Err... JS code will be executed.
guessing code executed means being able to see it in browser in noob terms
Link to comment
Share on other sites

To expound on what synook said, As long as your application requires databases, you will simply have to create the databases on your computer, and then use some kind of export tool to export the format of your tables(phpMyAdmin does this along with the MySQL query browser). The reason your php scripts show up differently from the scripts on your webserver is because the scripts on your computer are not being parsed, so the PHP is not having anything done wiht it. It's just text there in an HTML file for all your browser knows. It takes a server to parse the PHP and output it to the browser.And I use WAMP because sometimes I just get annoyed having to update, look again, update again, when i could just get a working version on my computer and then update it on the server itself. It's much easier.And Javascript will be executed regardless of if you have a server set up or not. There are just certain AJAX functions that windows doesn't allow for safety, so you may get some errors that can only be fixed by viewing it through localhost.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...