I just wrote a website for a client using php. I'm just not sure what my next step is. I test it at home by entering
http://localhost/websites/progname.php

(websites is a file in my HTDOCS that holds my php script)

1- I would like to copy all my files onto my disk on key and bring them to the client, can I run it by him if he doesnt have php installed?

2- how do I download it to a website ftp? in the past I've renamed my HTML to index.htm and that's how the website runs, so where does the localhost go in ?

3- can anyone see this website even if they dont have php installed?

I obviously do not understand how to use php out in the www, so please explain it clearly (like you're talking to an idiot (which I'm not))

thanks for your patience 🙂

    Ok...

    PHP is a server side language unlike Javascript which runs in the browser hence making it client side scripting. This means user does not have to have anything besides a browser and a internet connection to execute a PHP website.

    The server does need PHP though as he will be doing all the work. Most hosting companies does have PHP installed with their Apache (Web Server), so as soon as Apache sees it is a .php extension it calls PHP to handle it and spit out the parsed HTML.

    You can copy the .php file you created but you need to run it on a machine with HTTP Server (Apache and PHP) installed. So taking your flashdisk with you is not a good idea, rather have a temporary hosting location to upload your PHP file to using a FTP client like FileZilla, then you can tell your client to browse to that certain location and he will see what you have done.

    Google some hosting companies, when you sign on with them they will give you FTP details and with the domain you chose, you will then upload your php files to the ftp server and simply browse to your domains location, the php file should now run.

    When you browse to http://localhost this means that you turned your local machine into a http server that is why you needed to install all those XAMPP/LAMP stuff, this is because your machine (server side) is responsible for parsing the PHP code...

    Hope this helps...

      thank - you for the clear explanation.

      now for the next question:

      rather have a temporary hosting location to upload your PHP file to using a FTP client like FileZilla, then you can tell your client to browse to that certain location and he will see what you have done.

      what is a temporary hosting location?

        A temporary hosting location is essentially a Web Server running IIS/Apache and php.

        The only way you can have someone view your website is to either upload the files to a webserver (this could be from a web hosting company) or you can have the client view the files on your development machine as this would have PHP and Apache installed on it.

        You cannot just have the files on a USB stick and have the client just view from it using there own machine as that machine is unlikely to have PHP and Apache installed and working and it needs to be installed and working for a machine to be able to read and execute PHP code.

        Sorry. What you can do is actually install XAMPP on a USB stick which is a programme that installs Apache and PHP automatically. You can than have a portable web server running on the USB, all you have to do is take the key to the client and run the application, this is a working environment that alot of people actually use. Search for "XAMPP USB install" in Google. You do require a large USB stick over a Gig in size, as this will need to have Apache PHP MySQL and PHPMYADMIN along with other stuff including your php files stored on it- XAMPP does the installation but you will have to select the USB device as the destination drive.

          Not a problem, dont forget to mark the thread as RESOLVED.

            Write a Reply...