I originally learned java by using <%=request.getContextPath()%> to get the site root directory, but now I’m confused when learning php
java is
< ;a href="<%=request.getContextPath()%>/html/main/main.jsp">Homepage</a></span>
How to write php
You can use $_SERVER['DOCUMENT_ROOT'] to get
PHP has a magic constant __FILE__ that can be obtained
You can use $_SERVER['DOCUMENT_ROOT'] to get
PHP has a magic constant __FILE__ that can be obtained