Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Off Topic Discussions > Other Chat

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-21-2010, 08:10 AM
robertson robertson is offline
Member
 
Join Date: Sep 2010
Posts: 1
Credits: 856
robertson
Default How to get a PHP file to be included in the files in different directories?

Currently I have created some web pages in PHP and moved to my hosting a server.It installed.With PHP 5.1.6 that I am able to include only the files that are in the same directory (which work well with require (). If this is not an error message to show some No such file in the directory appears on the page. Want to use them for inclusion in various direcetories.What I do?
Reply With Quote
  #2  
Old 09-24-2010, 08:23 PM
Killgore Killgore is offline
Member
 
Join Date: Dec 2008
Posts: 82
Credits: 10,767
Killgore is an unknown quantity at this point
Default RE: How to get a PHP file to be included in the files in different directories?

Something along the lines of
PHP Code:
include('the FULL url of the file you wish to include'); 
should work. You could also use the require() function as well.

Note: the full url you're looking for should be something like
Code:
http://websitename.com/directory/file.php
Reply With Quote
  #3  
Old 10-28-2010, 07:51 AM
pumashoes34 pumashoes34 is offline
Member
 
Join Date: Oct 2010
Posts: 1
Credits: 130
pumashoes34
Default RE: How to get a PHP file to be included in the files in different directories?

Quote:
Originally Posted by Killgore
Something along the lines of
PHP Code:
include('the FULL url of the file you wish to include'); 
should work. You could also use the require() function as well.

Note: the full url you're looking for should be something like
Code:
http://websitename.com/directory/file.php
The answer to your questions, however, is by using relative paths.

Do a quick search for: php includes relative paths
Reply With Quote
  #4  
Old 11-09-2010, 07:58 AM
denverwed denverwed is offline
Member
 
Join Date: Nov 2010
Posts: 1
Credits: 128
denverwed
Default RE: How to get a PHP file to be included in the files in different directories?

Quote:
Originally Posted by pumashoes34
Quote:
Originally Posted by Killgore
Something along the lines of
PHP Code:
include('the FULL url of the file you wish to include'); 
should work. You could also use the require() function as well.

Note: the full url you're looking for should be something like
Code:
http://websitename.com/directory/file.php
The answer to your questions, however, is by using relative paths.

Do a quick search for: php includes relative paths

yes i agree with you .... give ralative paths in include function....
Reply With Quote
  #5  
Old 11-09-2010, 11:20 AM
Derek M Derek M is offline
Member
 
Join Date: Nov 2010
Posts: 1
Credits: 129
Derek M
Default RE: How to get a PHP file to be included in the files in different directories?

Code:
<?php include('../yourdirectory/yourfile.php'); ?>
Don't use http:// or it'll mess up.
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Official Mysidia site directories list Hall of Famer Mysidia Adoptables Official Announcement 22 02-22-2016 09:35 PM
Javascript included in PHP? Aasixx Questions and Supports 2 10-30-2012 03:46 AM
css files superdude44 Questions and Supports 5 05-06-2012 06:46 PM
Updates to files. Bloodrun Suggestions and Feature Requests 11 01-18-2011 06:58 PM
lang.php not included in forgotpass.php [ANSWERED] arlecchina Questions and Supports 4 07-14-2009 07:42 PM


All times are GMT -5. The time now is 06:02 AM.

Currently Active Users: 732 (0 members and 732 guests)
Threads: 4,081, Posts: 32,031, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636