TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Targetting in PHP

Page: 1 2 Reply
Jan 27th 2004#139788 Report
Member since: Apr 20th 2002
Posts: 3000
The more, the merrier. ;)

Off the top of my head, from Marble's
[php]Upload Page
[/php]

[php]
$page=(file_exists("includes/".$page.".inc")) ? $page : "default";
include("includes/".$page.".inc");
[/php]

Defines page depending if the file exists, if it does, it'll assign page to itself, else sets page to the default. If $page is empty, the file_exists function will return false (unless you have a .inc file in your includes folder... which you won't).
Reply with Quote Reply
Page: 1 2 Back to top
Please login or register above to post in this forum