Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

How can I fix this PHP Include problem?

Source code I have written openly published for your viewing pleasure.


How can I fix this PHP Include problem?

Postby ashtonfarell » Fri Feb 05, 2010 1:37 am

I currently use this code:

<?
include './includes/rightbar.php';
?>

But when I create a file within a sub-folder this not longer works, as it fails to include the correct file.

Can anybody help me with this coding, please?
ashtonfarell
U.E. Newbie
U.E. Newbie
 
Posts: 4
Joined: Fri Feb 05, 2010 1:16 am
Operating System: Ultimate Edition 3.0 32 BIT



Re: How can I fix this PHP Include problem?

Postby cowboy » Fri Feb 05, 2010 3:27 am

TheeMahn could answer this in a heartbeat or one of the other guys you might try looking here.. http://www.php.net/manual/en/tutorial.firstpage.php someone soon will help you that is more qualified...
welcome tp Ultimate Edition
"Back up your Data"
"May I never lose the view of a nubie"
"Give a man a fish, he will eat for a day, teach a man how to fish , he will eat a lifetime"
Asus P8Z68-V PRO/GEN3
i5 2500k
3x4G-Skill Ripjaws
MSI GTX 560Ti Hawk..
Seagate 1TB Barracuda
NZXT 850w PS
CM Storm Sniper Case
Evga Superclock CPU Cooler
Mushkin SSD coming soon
http://acowboydave.blogspot.com/
User avatar
cowboy
U.E. God
U.E. God
 
Posts: 2625
Joined: Mon Oct 15, 2007 2:38 pm
Location: Scottsdale Az
Age: 71
Operating System: Ultimate Edition 3.2 64 BIT



Re: How can I fix this PHP Include problem?

Postby JOHNNYG » Sun Feb 07, 2010 1:49 am

ashtonfarell wrote:I currently use this code:

<?
include './includes/rightbar.php';
?>

But when I create a file within a sub-folder this not longer works, as it fails to include the correct file.

Can anybody help me with this coding, please?

For Newbie, You sure do a lot of terminal work ! <BREW> :lol:
JOHNNYG
Image
Ultimate Eddiction<
Ultimate Edition STUDIO
Ultimate-E
Onyx 64
Pentium 4 processor
2x512 Kingston DDR memory
Maxtor Diamondmax 500 gig
Maxtor Maxline 80 gig, Split for testing only !
Maxtor Diamondmax 500 gig, Storage
Booting 8 OS's, No MS !
ATI 9600 series (RV350 AQ)graphics card
Sony DVD/CD Rewritable Drive DOUBLE LAYER DRU-820A/Sony DRU-800A CD DVD±RW Dual DVD Recorder
Team Leader at
http://www.ultimateeditionoz.com/
Image
Image
Image
User avatar
JOHNNYG
Site Admin
 
Posts: 1456
Joined: Mon Apr 13, 2009 12:02 am
Location: U.S.A. Illinois
Operating System: Ultimate Edition 3.2 32 BIT



Re: How can I fix this PHP Include problem?

Postby chrisssteeven » Tue Feb 16, 2010 7:24 am

Hi,
I also have the same problem as Ashton and also new to PHP. But I have
solved my problem using your given link, It has very useful information and
clear solution about it. I want to say thanks to you for sharing this information.
chrisssteeven
U.E. Newbie
U.E. Newbie
 
Posts: 5
Joined: Thu Feb 11, 2010 3:27 am
Operating System: Ultimate Edition 3.2 32 BIT



Re: How can I fix this PHP Include problem?

Postby cowboy » Tue Feb 16, 2010 10:38 am

chrisssteeven wrote:Hi,
I also have the same problem as Ashton and also new to PHP. But I have
solved my problem using your given link, It has very useful information and
clear solution about it. I want to say thanks to you for sharing this information.

Glad it helped you....
welcome to Ultimate Edition
"Back up your Data"
"May I never lose the view of a nubie"
"Give a man a fish, he will eat for a day, teach a man how to fish , he will eat a lifetime"
Asus P8Z68-V PRO/GEN3
i5 2500k
3x4G-Skill Ripjaws
MSI GTX 560Ti Hawk..
Seagate 1TB Barracuda
NZXT 850w PS
CM Storm Sniper Case
Evga Superclock CPU Cooler
Mushkin SSD coming soon
http://acowboydave.blogspot.com/
User avatar
cowboy
U.E. God
U.E. God
 
Posts: 2625
Joined: Mon Oct 15, 2007 2:38 pm
Location: Scottsdale Az
Age: 71
Operating System: Ultimate Edition 3.2 64 BIT



Re: How can I fix this PHP Include problem?

Postby hendrleybeton » Fri Oct 29, 2010 1:17 pm

Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in the include_path, include() will finally check in the calling script's own directory and the current working directory before failing.
hendrleybeton
U.E. Newbie
U.E. Newbie
 
Posts: 4
Joined: Fri Oct 29, 2010 8:52 am
Operating System: Ultimate Edition 3.1 64 BIT



Re: How can I fix this PHP Include problem?

Postby athel.davis » Fri Nov 26, 2010 5:49 pm

I seen your code but according to me your way to use include is wrong.Use include in following way,
<?
include ("register.php");
?>
Your data or path of folder must be in ().
athel.davis
U.E. Newbie
U.E. Newbie
 
Posts: 6
Joined: Fri Nov 26, 2010 5:42 pm
Operating System: Ultimate Edition 3.1 64 BIT



Re: How can I fix this PHP Include problem?

Postby carlbug » Tue Jul 26, 2011 5:01 am

replace 'include' with 'require'... that should solve the problem





Please keep all links in post or Sigs to *nix or Ultimate Edition Content
carlbug
U.E. Newbie
U.E. Newbie
 
Posts: 4
Joined: Mon Jul 25, 2011 11:25 am
Operating System: Ultimate Edition 3.1 64 BIT


Return to Programming

Who is online

Users browsing this forum: No registered users and 7 guests