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
https://forums.phpfreaks.com/topic/167745-solved-what-the-f/
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.