Jump to content

Functions


tcorbeil

Recommended Posts

interpim, if I showed you this function of variable declaration, is there something that catches your eye??

 

<?php

 

function getvariables(){

$servername = $_SERVER['SERVER_NAME'];

$documentroot = $_SERVER['DOCUMENT_ROOT'];

$pagepath = $_SERVER['SCRIPT_NAME'];

$pi = pathinfo($_SERVER['SCRIPT_NAME']);

$slash = "/";

$pageroot = $pi['dirname']."/";

$global = $documentroot."/Global/";

$addgif = "http://www.xxxxxxx.com/Global/add.gif";

//setup for Metag Tag

$filename = basename($pagepath, ".php");   //get the filename

$formatname = str_replace("_", " ", $filename);   //get the underscores out of it.

$metatag = "xxxxxxx.com: ".$formatname;    //add the site name in front.

 

echo $servername."**";

echo $documentroot."**";

echo $pagepath."**";

echo $pi."**";

echo $slash."**";

echo $pageroot."**";

echo $global."**";

echo $addgif."**";

echo $filename."**";

echo $formatname."**";

echo $metatag."**";

}

?>

 

this function seems to get caled twice during HTML load and nowhere have I got the function called...

Link to comment
Share on other sites

Here's a few ideas to try:

 

1.  Temporarily change the name of the function.  Do you get any errors coming up where it was being called from before?

2.  Try changing the output of the function.  Does the output of your script change?  If no, then your function isn't being called.. it's another function which looks the same.

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.