ads here
       

Go Back   Rewards1 Forums > General > General Discussion


 
 
Thread Tools Display Modes
Old 09-07-2010, 05:58 PM   #1
☆Joey☆
Senior Member
 
☆Joey☆'s Avatar
 
Join Date: Jul 2008
Location: Ontario Canada
Posts: 1,437
☆Joey☆ is on a distinguished road
Default Php, Including files?

So here's the problem I'm having here, I'm trying to include two files (the layout) of a webpage, in order to start off a whole new page.
But my folder is on my desktop, named qwerty, and in that folder, there's a folder called include, and a folder called blah, and in blah(this is just a example), there's alphabets from A-Z, and in that A folder, I have a .php file, I'm doing this so it's organized.
So heres what I would normally input if was to just put the .php file in the root of the whole folder.
Quote:
<?php include ('include/top.php');?>
--->Input Content here <-------
<?php include ('include/bottom.php');?>
But right now what am I supposed to input? they're both in separate folders.
Help will be appreciated, +repped, thanks.
__________________
☆Joey☆ is offline  
Old 09-08-2010, 02:22 AM   #2
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default

You can use include to choose different folders...

<?php include ('x/top.php');?>
<?php include ('y/bottom.php');?>

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
Old 09-08-2010, 11:17 AM   #3
☆Joey☆
Senior Member
 
☆Joey☆'s Avatar
 
Join Date: Jul 2008
Location: Ontario Canada
Posts: 1,437
☆Joey☆ is on a distinguished road
Default

Yea, but I believe that only would work if my actual .php file was located in the root folder, and in this case I can't figure this out because my .php file is in a different folder inside of qwerty. which means.. I gotta somehow get the command to go back into the root folder and go inside the include folder to include those two files.
__________________
☆Joey☆ is offline  
Old 09-08-2010, 11:29 AM   #4
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default

<?php include ('../lol/wut.php'); ?>

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
Old 09-08-2010, 11:34 AM   #5
☆Joey☆
Senior Member
 
☆Joey☆'s Avatar
 
Join Date: Jul 2008
Location: Ontario Canada
Posts: 1,437
☆Joey☆ is on a distinguished road
Default

Just tried that, doesn't show up :/
__________________
☆Joey☆ is offline  
Old 09-08-2010, 12:47 PM   #6
Blockis
Elite Block
 
Blockis's Avatar
 
Join Date: Mar 2009
Location: Rochester, NY
Posts: 4,481
Blockis has a spectacular aura aboutBlockis has a spectacular aura about
Default

Just so you know, you can't run PHP on your desktop. You'll need to upload it to a server for it to work...

Blockis
__________________
FileRev - Get Paid To Upload - Up To $0.75 PER Download!

Blockis is offline  
Old 09-08-2010, 09:38 PM   #7
ralphschu
Junior Member
 
Join Date: Jul 2010
Posts: 193
ralphschu can only hope to improve
Default

Quote:
Originally Posted by Blockis View Post
Just so you know, you can't run PHP on your desktop. You'll need to upload it to a server for it to work...

Blockis
fail yes you can, download Xampp.
ralphschu is offline  
 

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

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

Forum Jump


All times are GMT -8. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.