Member
Member
ferentz   2012-04-07, 07:28
#1

Hello! I'm trying to use the include(); function in the page codeblock, but I'm getting a php error "failed to open stream: No such file or directory". The same code works fine if I type it directly in pages.php. Is there something I'm missing? Thanks!

``

I could use an if statement in pages.php to print the included code only in my desired page, but I think that's nasty coding.

Member
Member
ferentz   2012-04-07, 07:37
#2

p.s. Is there a similar variable for uploaded folder?
``

Administrator
Administrator
acrylian   2012-04-07, 09:18
#3

If you want a specific page layouted specifially you should look at the multiple_layouts plugin. (I don't think using an if statement would be nasty coding, I do that all the time on our own site but that is partly from times before said plugin existed).

Member
Member
sbillard   2012-04-07, 17:59
#4

You will probably have to use the fully qualified path to the script. Includes like you show are relative to the "current" folder. For codeblocks it is problematical to know what the current folder might be.

There are defines for the various Zenphoto folders. See golbal-definitions.php.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.