Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Including and gathering of different snippets from one php-file

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34452
    Kralle
    Participant

    Hello fellow pirates, yaaarrrr!
    That was a lot of ‘including’ in the title…

    Anyways, I hope you can help me with this problem of mine.

    I’m making a website where I’m using PHP includes to include files such as header.php, sidebar.php and footer.php. Is there any way to gather the code from these files and put them into one single file called includes.php – and in the individual pages simply just include bits from includes.php? If that’s possible, how do I do this?

    Thanks in advance,
    Theis

    #87762
    TheDoc
    Member

    I’m not PHP expert, so I’d probably say ‘no’. Is there a reason why you need this to happen?

    #87770
    Kralle
    Participant

    Simply because it’s a mess looking at in the FTP, since I have quite a lot of files in my directory – and it’d make it a lot easier to manage those snippets from one file.

    #87780
    TheDoc
    Member

    If it’s a mess, just throw them all into a folder called ‘includes’.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.