This one is giving me MAJOR headaches. My problem is with functions. I am making a very modular website where many functions are stored on different *.php files. One of my main files index.php calls another one functions.php which has a set of functions in it. The two are connected with an require_once statement in index.php.
The problem arises when i make a new function in functions.php and then call the function from index.php. My page just dies! blank... as if there is a problem... so i try everything possible... until for some reason... it works!! after some time the function works fine and all good... so ignore the happening and go on with my little life... but now i made a new function, called it... and voila poop in my face... so i desperately try everything...EVERYTHING... and then after like 1 hour it works again.
The old functions there work absolutely fine, the new ones i create are simple output functions that make debugging easy.
Oh my god i really don't understand what is wrong.. and this takes up so much time... Thanks...
Even weirder problem.
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Any new function i make somehow gives me the blank page... if i change the call to the function (ie modify the name, position ) a few hundred times... somehowe that one function that i made passes thru... now whatever i do to it somehow php remembers that one "works" and i can work with it... the functions i am talkng of are simple:
i call the function from another file...
I am so frustrated...and the problem seems so obscure... i am starting to think it is something within the server settings...
Code: Select all
function foo()
{
echo('hopefully this will display');
}I am so frustrated...and the problem seems so obscure... i am starting to think it is something within the server settings...