Jump to content

[SOLVED] What the F***!


TheFilmGod

Recommended Posts

This has got to be a php bug!

 

This is really weird. I require() a file which has numerous functions in it that I call within the main php file later on. AS such:

 

<?php
// Require page directory handler
require ('page_builder.php');
// Define unique page elements
$page['name'] = 'login';
?>
<html>
... html crap ...
<?
build_toolbar(); // defined in page_builder.php file that was required earlier
?>
... html crap ..
</html>

 

Very simple. Works like a charm when the required file is in the same directory as the main file. But when i move the required file into its own directory (away from the main file), php pukes out: "Call to undefined function "build_toolbar();"

 

For some reason php is not registering my functions when I put the required file deep into some directory. This is a problem, because I'm using the require function for a reason... aRG! This doesn't make sense.  :facewall:

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.