Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-16-2007, 06:04 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
Page Name

Is there a way to get the Page.php to know its own name? Like a getfilename() function so tha it shows that file name?
__________________
Reply With Quote
  #2  
Old 10-16-2007, 06:30 PM
Lakie is offline Lakie

Join Date: Mar 2002
Posts: 5,540

try

PHP Code:
echo('file = '.basename ($PHP_SELF,".php")); 
http://au.php.net/basename
Reply With Quote
  #3  
Old 10-16-2007, 06:38 PM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
hmm I did something like that but I think there is a probablem because I am not passing it in the header of the functions that use it.

It is another freaking:
Notice: Undefined variable: pagename in d:\easyphp\www\video.php on line 224

Thing is that it is defined....I placed: $pagename="video.php"; at the top of the file.
__________________

Last edited by atholon; 10-16-2007 at 06:45 PM.
Reply With Quote
  #4  
Old 10-17-2007, 01:13 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

could you post a bit more of your code?
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #5  
Old 10-17-2007, 09:41 AM
atholon is offline atholon
"ath-hole"

Join Date: Jan 2003
Location: Failville.
Posts: 11,357

Send a message via MSN to atholon
Got it reslolved. The reason was because I was not passing it through the () at the top of the functions that were going to us it.

$_SERVER[PHP_SELF] was what I was looking for. It will save a lot of headaches in the future.
__________________
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Page Is Up! Hooray! Sen Web design and Programming 5 11-19-2006 11:32 AM
Open text from page in another page katana*GFR* Web design and Programming 21 07-21-2005 10:28 AM
Page Cannot Be Displayed atholon Feedback / Novahq.net Support 1 04-21-2005 11:57 AM
<Previous page 1 2 3 4 5 6 next page> script big n00b at php phphq.Net Forums 4 03-11-2005 12:35 PM
How to get on page 1? jeremy Delta Force 0 01-03-2003 07:03 PM


All times are GMT -5. The time now is 06:50 AM.




Powered by vBulletin®