search

Home  >  Q&A  >  body text

thinkPHPd routing settings

http://localhost:90/ThinkPHP2/index.php/Admin/Login/login

If accessed in the above form, the css or other paths introduced in PHP No longer exists.

http://localhost:90/ThinkPHP2/index.php?s=/Admin/Login/login

If this is the case, the style path will be displayed correctly , how to solve it (the first method is also guaranteed to be correct)


风起时丶丶想你风起时丶丶想你2284 days ago1103

reply all(2)I'll reply

  • 风起时丶丶想你

    风起时丶丶想你2018-10-15 13:46:59

    It has been solved. When introducing files into a page, (./) is generally used to represent the root directory and (../) to represent the upper level. However, this does not work here. It will be considered http://localhost:90/ThinkPHP2/index.php?s=/ Admin/Login/login is the project path, causing an error in the current project path on the page. There is no problem if you use __ROOT_ as the absolute path

    reply
    0
  • Summer

    Correction: (./) is the current directory; (/) is the root directory;

    Summer · 2018-10-16 09:38:24
  • Cancelreply