User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,807 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,511 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 890 | Replies: 1
Reply
Join Date: Nov 2006
Posts: 3
Reputation: Maples is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Maples Maples is offline Offline
Newbie Poster

Test For Php Includes

  #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?"
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2006
Location: South Wales
Posts: 159
Reputation: phper is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 11
phper's Avatar
phper phper is offline Offline
Junior Poster

Solution Re: Test For Php Includes

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 6:16 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC