Jump to content

Zepx

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Zepx's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Zepx

    require_once

    yep. thanks, I found out the problem wasn't related to require_once. It was because of variable's scope.
  2. Zepx

    require_once

    sorry for the trouble, please check again the link. I've forgotten that I've made the link private.
  3. Hi, I'm facing a very weird problem. First I would like to explain what is going on. 1. I have a first.php script that does a require('settings.php'); and another second.php script that does a require_once('settings.php'); 2. The idea here is to load settings.php and output the variables inside of it. It also has 3 functions. The problem is when both of first.php and second.php script loads together, the settings.php gets loaded once, but I can't echo and variables from settings.php from my second.php script. I had onced tried both files using required() but I got an error saying that I'm not allowed to redeclared the functions that were already declared. So I knew I had to use require_once(). But it's not working like how I want. For those who can't get what I mean, please check out this two links, http://zepx.co.cc -- The homepage, if you look at the sidebar, under New Links, you should see that the output works fine. http://zepx.co.cc/links/ -- Now, look at the sidebar, it's showing errors. It says that I'm using File() but there was no parameter in it, that is because I took the parameter from settings.php, which resulted an empty string. Also, as you can see at http://zepx.co.cc/links/ , the page has 2 php scripts, one was loaded in the content, and the other in the sidebar. I'm not sure if my explaination was clear. If it's not, I'll try to restructure my sentences. Regards, Zepx
×
×
  • 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.