Go Back   SEO Help | Search Engine Optimzation and Marketing Forums » Technical help » Development

Development Coding help here!

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-22-2009, 01:23 AM
New Member
 
Join Date: Oct 2009
Posts: 3
Bips123 is on a distinguished road
Default How to get a PHP file to be included across files in different directories?

Hi,

Currently I have created some php based webpages and uploaded them to my web hosting server.It has a PHP 5.1.6
installed.With this I am able to include files only that are in the same directory(they work well using require() fn).If not an error message displaying some "no such file" in directory appears in the page.I would like to use them to be included in different direcetories.What should I do?
Reply With Quote
  #2 (permalink)  
Old 07-12-2010, 02:47 PM
New Member
 
Join Date: Jul 2010
Posts: 2
businessesinct is on a distinguished road
Default

create the directories and include the names when using the require() function.

example :

your index.php is in the root directory
/index.php
and you have a directory with your other php files in
/lib/other.php

so in index.php you will have

require("lib/other.php");
__________________
Business Listings | connecticut listing
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Have your Site manually submitted to 1028+ SEO Friendly Web Directories
All times are GMT -5. The time now is 08:14 PM. Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.