Question

In: Computer Science

PHP Language I have XAMPP and I don't know how to display my PHP code. For...

PHP Language

I have XAMPP and I don't know how to display my PHP code. For instance, when I create a basic HTML webpage I just open the code into a web browser and it shows me a basic web page. When I try to show a PHP calculation it doesn't show. What are the steps in displaying my PHP doc?

Solutions

Expert Solution

`Hey,

Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

Start the XAMPP program. When started, XAMPP loads itself into your icon tray. The icon is orange with a white bone-like shape in its center. Single-click the icon to expand the Control Panel. Click on the "Start" button next to "Apache" to start your Apache Web server. When Apache is running, the word "Running" will appear next to it, highlighted in green. Also start "MySQL" if your PHP scripts depend on a MySQL database to run.

Place your PHP files in the "HTDocs" folder located under the "XAMMP" folder on your C: drive. The file path is "C:\xampp\htdocs" for your Web server. Make sure your PHP files are saved as such; they must have the ".php" file extension. Open up any Web browser on your desktop and enter "localhost" into the address box. The browser will open a list of files stored under the "HTDocs" folder on your computer. Click on the link to a PHP file and open it to run a script.

Create any folders you need to test PHP files in under the "HTDocs" folder. If you create a folder named "scripts," then use the address "localhost/scripts" to open them in your browser.

Kindly revert for any queries

Thanks.


Related Solutions

I don't know how to build my last code for TestPairOfDice...below the question is in bold....
I don't know how to build my last code for TestPairOfDice...below the question is in bold. I'm including my code for the previous problems which are all needed for number 6 1. Implement a method named surface that accepts 3 integer parameters named width, length, and height as user input. It will return the total surface area (6 sides) of the rectangular box it represents. The formula for Surface Area is 2(length * width) + 2(length * height) + 2(height...
I don't know why my java code is not running this error code pops up -->...
I don't know why my java code is not running this error code pops up --> Error: Could not find or load main class DieRoll Caused by: java.lang.ClassNotFoundException: DieRoll. Code below:    import java.util.Random;    import java.util.Scanner;    public class Assignment {    public static void combineStrings() {    String school = "Harvard";    String city = "Boston, MA";    int stringLen;       String upper, changeChar, combine;       stringLen = school.length();    System.out.println(school+" contains "+stringLen+" characters." );   ...
I know how to do this with arrays, but I have trouble moving my code to...
I know how to do this with arrays, but I have trouble moving my code to use with linked lists Write a C program that will deal with reservations for a single night in a hotel with 3 rooms, numbered 1 to 3. It must use an infinite loop to read commands from the keyboard and quit the program (return) when a quit command is entered. Use a switch statement to choose the code to execute for a valid command....
In which folder of XAMPP would I put in my PHP code
In which folder of XAMPP would I put in my PHP code
I'm getting an error message with this code and I don't know how to fix it...
I'm getting an error message with this code and I don't know how to fix it The ones highlighted give me error message both having to deal Scanner input string being converted to an int. I tried changing the input variable to inputText because the user will input a number and not a character or any words. So what can I do to deal with this import java.util.Scanner; public class Project4 { /** * @param args the command line arguments...
This is my C language code. I have some problems with the linked list. I can't...
This is my C language code. I have some problems with the linked list. I can't store the current. After current = temp, I don't know how to move to the next node. current = current-> next keeps making current into NULL. #include #include #include #include struct node{int data; struct node *next;}; int main() {     struct node *head, *current, *temp, *trash;     srand(time(0));     int randNumber = rand()%51;     if(randNumber != 49)     {         temp = (struct node*)malloc(sizeof(struct node));         current = (struct node*)malloc(sizeof(struct node));...
How can I make my php code without using the money format just loop and if...
How can I make my php code without using the money format just loop and if statements print like this: Change for 5 dollars and 20 cents: 0 ten dollar bills 1 five dollar bills 0 one dollar bills 0 quarters 2 dime 0 nickel 0 pennies I am trying to ask the user to enter amount and output their change they entered. $input; $TenBills = 1000; $FiveBills = 500; $OneBills = 100; $Quarters = 25; $Dimes = 10; $Nickels...
The programming language that is being used here is JAVA, below I have my code that...
The programming language that is being used here is JAVA, below I have my code that is supposed to fulfill the TO-DO's of each segment. This code in particular has not passed 3 specific tests. Below the code, the tests that failed will be written in bold with what was expected and what was outputted. Please correct the mistakes that I seem to be making if you can. Thank you kindly. OverView: For this project, you will develop a game...
This code is an expression of cp command in c language. But I don't understand this...
This code is an expression of cp command in c language. But I don't understand this code very well. Please explain in notes one by one.(in detail) #include<stdio.h> #include<stdlib.h> #include<fcntl.h> #include<errno.h> #include<stdlib.h> #include<unistd.h> #include<sys/types.h> #include<sys/stat.h> #include<unistd.h> int main(int argc, char *argv[]) { char ch; int src, dst; struct stat st; if(argc != 3) { printf("argument error \n"); printf("usage: ./a.out src dest \n"); exit(0); } if (stat(argv[1], &st) == -1) { perror("stat : "); exit(-1); } src = open(argv[1], O_RDONLY); if(src...
I have the formulas for how to calculate ROI, Margin and Turnover. But I don't know...
I have the formulas for how to calculate ROI, Margin and Turnover. But I don't know if I am using the right numbers and it gets frustrating. A worked out calculation for each would really be helpful so I know what numbers from what years you plugged in. Your time is valuable and would really appreciate the help. If the response is correct, I would not mind giving a like! Return on Investment, Margin, Turnover Ready Electronics is facing stiff...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT