Jump to content

Getting right link in function.


a1amattyj

Recommended Posts

Hello,

 

My function:

 

function LoadTemplate($template_name,$file){
         return ("../templates/$template_name/$file");
}

 

Directory Struct>

 

index.php > file_get_contents(../templates/default/header.html) [function.file-get-contents]: failed to open stream: No such file or directory in

functions/functions.php > The Function

admin/index.php > Loads template fine

templates are...

templates/name/header.html

 

So i take it that:

"../templates/" is wrong? Thanks!

Link to comment
https://forums.phpfreaks.com/topic/110398-getting-right-link-in-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.