How to Test a PHP File?




(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)



(5.00 out of 5)





How to Test a PHP File?
Log in to answer.
Copyright © dBuggr LLC - All Rights Reserved.
nishantbaxi 12:35 am on February 12, 2010
Step 1Install PHP for your operating system. Linux users can use the software repository for their distribution. Windows users can download and install PHP from the PHP for Windows website (see Resources).
Step 2Open a terminal window (Linux) or a Command Prompt window (Windows). This will provide you with a command line where you will type the following commands.
Step 3Type the command “cd php_directory” (both Linux and Windows) to change to the directory where your PHP script is held. Change “php_directory” to the correct location for your script.
Step 4Type the command “php script.php” (Linux) or “C:\PHP5\php.exe -f “script.php”" (Windows) to execute the script. Change “script.php” to the correct name of your script.
Step 5Type “exit” to close the terminal window or Command Prompt window.
Web Server
Step 1Upload your PHP file to your Web server.
Step 2Open a Web browser.
Step 3Type the address of the Web page containing your PHP code in the browser’s address bar.