Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I don't understand this error please help

Status
Not open for further replies.
Apr 4, 2001
34
0
0
GB
Hi
I have been copying some code from a book so I can learn php.
I get an error everytime I run it. The function that is causing the problem is this.

if (strpos ( $GLOBALS['SCRIPT_NAME'], $url )==false)

The error message is

Notice: Undefined index: SCRIPT_NAME in C:\websites\Test\chapter6\page.inc on line 113
can someone explain what it means

thanks
Russ
 
Take a look at this:


I'm not sure $GLOBALS['SCRIPT_NAME'] exists. You may want to try $_SERVER['SCRIPT_FILENAME'], or, even better $_SERVER['PHP_SELF'].

*cLFlaVA
----------------------------
Ham and Eggs walks into a bar and asks, "Can I have a beer please?"
The bartender replies, "I'm sorry, we don't serve breakfast.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top