[wp-hackers] Re: "This page" inconsistency
David Coppit
david at coppit.org
Wed Apr 5 19:37:08 GMT 2006
On Wed, 5 Apr 2006, Owen Winkler wrote:
> To demonstrate using some of your code:
>
> $_SERVER['PHP_SELF'] . "?page=" . plugin_basename(__FILE__)
>
> Does every server/config provide PHP_SELF? It might be better to use
> get_settings('home') . '/wp-admin/{actual_page_name_here}'
Odd. I tried this:
$page_uri = $_SERVER['PHP_SELF'] . "?page=" . plugin_basename(__FILE__);
and got this error:
PHP Fatal error: Cannot redeclare class category_order_management
but this works:
$page_uri = $_SERVER['PHP_SELF'] . "?page=" . basename(__FILE__);
Is this my fault? Do I need to guard my class with
"if (!class_exists(...))"?
David
_____________________________________________________________________
David Coppit david at coppit.org
The College of William and Mary http://coppit.org/
"... frothy eloquence neither convinces nor satisfies me."
-- 1899, Willard D. Vandiver (D-MO)
More information about the wp-hackers
mailing list