Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[PHP] .htaccess and $_SERVER[PHP_SELF]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Mattraks
How do I cheat?
Reputation: 0

Joined: 21 Oct 2007
Posts: 0
Location: IRAQ!

PostPosted: Mon Oct 13, 2008 3:48 pm    Post subject: [PHP] .htaccess and $_SERVER[PHP_SELF] Reply with quote

Well, I'm trying to make a page not found page which will say "The page /blahblah could not be found" when they stumble upon a 404. I tried to do that by:

/.htaccess:
Code:
ErrorDocument 404 /404.php


/404.php:
Code:
<title>Page Not Found</title>
<?php
echo "The page " .$_SERVER[PHP_SELF]. " was not found.<br><br>Go to the <a href=/index.php>index</a>.";
?>


And it shows in my browser:
Quote:
The page /404.php was not found.

Go to the index.


Is there a way to get the current page and not the current file its reading? Thanks.

_________________
FOR ALLAH!
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Spawnfestis
GO Moderator
Reputation: 0

Joined: 02 Nov 2007
Posts: 1746
Location: Pakistan

PostPosted: Tue Oct 14, 2008 8:53 am    Post subject: Reply with quote

http://www.webcheatsheet.com/PHP/get_current_page_url.php
Explained well.

_________________

CLICK TO HAX MAPLESTORAY ^ !!!!
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Mattraks
How do I cheat?
Reputation: 0

Joined: 21 Oct 2007
Posts: 0
Location: IRAQ!

PostPosted: Tue Oct 14, 2008 3:16 pm    Post subject: Reply with quote

Thank you, it works.
_________________
FOR ALLAH!
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites