LIGHTENING YOUR WORKLOAD WITH INCLUDES browser, the password
LIGHTENING YOUR WORKLOAD WITH INCLUDES browser, the password remains hidden. Although the include file doesn t have a .php filename extension, its contents have been merged with index.php, and both files are treated as a single entity. Figure 4-3. PHP code inside an include file is parsed before the page is sent to the browser. 5. Now type the URL for menu.inc in the browser address bar. It should be http:// localhost/phpsolutions/includes/menu.inc (adjust the URL if your include file is in a different location). Load the file into your browser. This time, you ll see something very different, as shown in Figure 4-4. Figure 4-4. A file with an .inc filename extension is treated as plain text when accessed directly. Neither the server nor the browser knows how to deal with an .inc file, so the entire contents are displayed onscreen: raw XHTML, your secret password, everything . . . 6. Change the name of the include file back to menu.inc.php, and load it directly into your browser by adding .php to the end of the URL you used in the previous step. This time, you should see an unordered list of links, as shown alongside. Inspect the browser s source view. It should look similar to the navigation section in Figure 4-3. The PHP isn t exposed. 7. Change the include command inside index.php back to its original setting like this:
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.