Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
if url does exist than else mishaps
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Li1M0ST3Rz" data-source="post: 372275" data-attributes="member: 1271"><p>Alright hi guys i havent been one for ages, oh well but heres my problem i havent coded for a while so its a little rusty</p><p><img src="http://i.imgur.com/2na4sFM.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /> </p><p>[PHP]$host2 = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];</p><p> $link2 = array ('index.php', 'home.php?home', 'home.php?register', 'home.php?personal', 'home.php?contact', 'home.php?benefit', 'process.php');</p><p> if($host2 == $link2)</p><p> {[/PHP]</p><p>so i am basically doing is coding a code that if the url aint what the array has than lead to 404 page at the end of the page i added this:</p><p>[PHP]</p><p><?php</p><p> }else{</p><p> header('./404.php');</p><p> }</p><p>?>[/PHP]</p></blockquote><p></p>
[QUOTE="Li1M0ST3Rz, post: 372275, member: 1271"] Alright hi guys i havent been one for ages, oh well but heres my problem i havent coded for a while so its a little rusty [IMG]http://i.imgur.com/2na4sFM.png[/IMG] [PHP]$host2 = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; $link2 = array ('index.php', 'home.php?home', 'home.php?register', 'home.php?personal', 'home.php?contact', 'home.php?benefit', 'process.php'); if($host2 == $link2) {[/PHP] so i am basically doing is coding a code that if the url aint what the array has than lead to 404 page at the end of the page i added this: [PHP] <?php }else{ header('./404.php'); } ?>[/PHP] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
if url does exist than else mishaps
Top