Test For Php Includes

Reply

Join Date: Nov 2006
Posts: 3
Reputation: Maples is an unknown quantity at this point 
Solved Threads: 0
Maples Maples is offline Offline
Newbie Poster

Test For Php Includes

 
0
  #1
Nov 30th, 2006
"I am having a few problems trying to get my php includes showing on my page.

Is there any easy/basic code I can insert on a page to test whether it is really working. The package I get from my host does allow php includes so there shouldn't be a problem there?"
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 187
Reputation: phper is an unknown quantity at this point 
Solved Threads: 15
phper's Avatar
phper phper is offline Offline
Junior Poster

Re: Test For Php Includes

 
0
  #2
Nov 30th, 2006
Originally Posted by Maples View Post
"I am having a few problems trying to get my php includes showing on my page.

Is there any easy/basic code I can insert on a page to test whether it is really working. The package I get from my host does allow php includes so there shouldn't be a problem there?"
To correctly include you should use the following code;

  1. <?php
  2. include('file_i_want_2_include.php');
  3. ?>

This will allow you to include this file. The file must be in the same directory as the file you are inserting the include statement in. If not PHP will check your php.ini file for you include directories.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC