#实现一个简单的搜索框, 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. :{