Search the Community
Showing results for tags 'include files'.
-
The text book I am using has 1 page on include files and no examples. I understand how to call the include file and that when I name it I should use the inc_ prefix... Where I am lost is what needs to be inside the include file? What can I omit from the file? Do I just write it like it is part of the .php file I am working on Example...I want to use a include file for a list of links. Starting File <html> <head> </head> <body> <?php> include 'links.php'; ?> </body> </html> Include File <nav> <ul> <li><a href="link1.htlm">Link 1</li> <li><a href="link2.htlm">Link 2</li> <li><a href="link3.htlm">Link 3</li> </ul> </nav> Do I need anything else in the include or would this work?
-
Hello, I am VERY new to PHP. I have an assignment where we are working on include files. Everything looks okay.... but the contents from the include file are not showing up! Here is the assignment instructions: "The include file that you develop should create a table to display the contents of the $_REQUEST autoglobal. The table will have two columns showing each name/value pair. Use the advanced foreach statement syntax from Chapter 2 foreach(array_expression as $key => $value) to retrieve the index and value of each element of the $_REQUEST array. Be sure to use the stripslashes() and htmlentities() functions before displaying the text in the web page. The include file should be named as inc_requestDump.php. Create a second file named requestDump.php to test the include file." What am I doing wrong? Any help would be greatly appriciated. inc_requestDump.php requestDump.php