Worship Heaven: {online etc

Source: Internet
Author: User
Tags learn php
           

#实现一个简单的搜索框, and then connect the local Apache service via 127.0.0.1, window platform, Root_doc, is e:/codeedit/php, the following is the PHP parsing script:
Search Result

# # # Enter the keyword search, the address bar displays file:///E:/CodeEdit/php/127.0.0.1/formSearch.php, cannot find the page.
# #但是我修改一下: $item = "JavaScript", directly in the browser input: 127.0.0.1/formsearch.php can receive the correct reply, the command line input: PHP formsearch.php can also receive the correct reply.

?? Don't know what's going on?? I am a novice ah, just learn PHP only a week.


Reply to discussion (solution)

Problem with path jump

Browser input: 127.0.0.1/formsearch.php
Using the HTTP protocol, http://127.0.0.1/formSearch.php
Just browser-friendly saves you the trouble of entering HTTP.//

and file:///E:/CodeEdit/php/127.0.0.1/formSearch.php
is the file system protocol

Obviously your HTML code is not accessed through the Web server.
So it should be written


When running from the server, you just need to write

Path jumps have a problem thank you very much

Browser input: 127.0.0.1/formsearch.php
Using the HTTP protocol, http://127.0.0.1/formSearch.php
Just browser-friendly saves you the trouble of entering HTTP.//

and file:///E:/CodeEdit/php/127.0.0.1/formSearch.php
is the file system protocol

Obviously your HTML code is not accessed through the Web server.
So it should be written

When running from the server, you just need to write


Thank you very much, that's all. :{

  • Related Article

    Contact Us

    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

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.