Webmastersite.net
Register Log In

include php file in template

Title include php file in template
Description recomendation request
Message Text Paul, Refering to: scripts.webmastersite.net/w...s/PHP_in_Templates-16.html For the case we want to include some variable switches only available for admin, this at link edition template, and in case we whant to do it via inserting a .php file in the template: If we just insert this on the edit template: <?php include 'adminonly_edit.php' ?> And having the 'adminonly_edit.php' file upladed to the templates directory, we end with a Warning: Unknown(adminonly_edit.php): failed to open stream: No such file or directory in /user/home/server/public_html/links/commonfuncs.php(737) : eval()'d code on line 705 If we insert this on the edit template: <?php include 'http://www.mysite.com/links/templates/modified_templates/adminonly_edit.php' ?> We reach the 'adminonly_edit.php' correctly, but the inserted variables we need to switch are not interpreted as variable names and they are just shown as {LINKVARIABLENAME} . This for preexisting variables and also own variables. Could you please advice me what would be your recomendation for the best way to include the file and the way to have the variables available at the template. Thanks.
Rating
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
0/5 based on 0 votes.
Ownership peumus
Views 1,206 views. Averaging 0 views per day.
Similar Topics
Submission Date Dec 31, 2006 - 6:54 AM