bertsqaull Posted August 29, 2008 Share Posted August 29, 2008 Hey new to forums here, i have just recently set up a web page and having one problem with a piece of php. My aim is to make one basic layout etc so when I edit one thing the whole page changes. Now what id like to happen is when a link is clicked, i think, i want a text file to be called into the content part of my web page. So all i have to do is upload txt files for each page so its saves me uploading a millions new thinge to get my page updated. So basically have one layout uploaded and loads of text files just get called into the main part. Can anyone help me with this, if even a thing exists. Cheers in advance BertSquall Link to comment https://forums.phpfreaks.com/topic/121838-php-calling-files-help/ Share on other sites More sharing options...
dropfaith Posted August 29, 2008 Share Posted August 29, 2008 <?php include("../template/nav.html"); ?> includes work pretty well for me Link to comment https://forums.phpfreaks.com/topic/121838-php-calling-files-help/#findComment-628588 Share on other sites More sharing options...
bertsqaull Posted August 29, 2008 Author Share Posted August 29, 2008 sorry for noob question here as im new to php. So do i just stick that code in the part of the content i want the text file to be called to once a link is clicked. So by using that i can upload the one php page and use the rest text files then. Link to comment https://forums.phpfreaks.com/topic/121838-php-calling-files-help/#findComment-628593 Share on other sites More sharing options...
DarkWater Posted August 29, 2008 Share Posted August 29, 2008 First of all, wrong forum. Second of all, it won't automatically load in, they'll need to click a link which has a GET parameter on it, telling your script which page to load. This is really simple if you actually take the time to learn PHP. Go read w3schools tutorials. Link to comment https://forums.phpfreaks.com/topic/121838-php-calling-files-help/#findComment-628735 Share on other sites More sharing options...
ipoelnet Posted August 30, 2008 Share Posted August 30, 2008 <?php require("../template/template1.html"); require_once("../template/template2.html"); include("../template/template1.html") include_once("../template/template2.html") ?> Link to comment https://forums.phpfreaks.com/topic/121838-php-calling-files-help/#findComment-629618 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.