The most basic questions about getting started with PHP
Source: Internet
Author: User
When I first started PHP, I used wampserver, and then I could write the. PHP file. For example, you can write the. php file and enter & nbsp; "localhost/a. php" & nbsp; in the browser. then the file runs normally. But I want to follow the example on w3cschool: to create an html file: & lt; html & gt; & just getting started with PHP, the most basic problem
I use wampserver, and then I can write the. php file.
For example, you can write the. php file and enter "localhost/a. php" in the browser to run properly.
But I want to follow the example on w3cschool:
Create an html file as follows:
Create a php file as follows:
Welcome
Your email address is:
I put them in my www Directory. when I open the html file, enter the form and click the sumbit button.
File: // C:/wamp/www/php/welcome. php
The transfer information is not displayed. If I manually go to localhost/php/welcome. php, an error is reported indicating that the variable does not exist (this must be because it is not passed in ). I don't know how to redirect him to the correct localhost?
How can we ensure that data is correctly transmitted between html files and PHP files? Thank you! Share:
------ Solution --------------------
File: // C:/wamp/www/php/welcome. php ???
You opened your html file in a browser on the desktop?
Enter localhost/php/your html file in the address bar of your browser.
------ Solution --------------------
Access to html pages is the same as access to php pages. http: // localhost/xx.html is used instead of double-clicking
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service