Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

note 99762 deleted from control-structures.alternative-syntax by danbrown

3 views
Skip to first unread message

danb...@php.net

unread,
Sep 3, 2010, 11:53:15 AM9/3/10
to php-...@lists.php.net
Note Submitter: gratcypalma at gmail dot com

----

<?php
/* my simple script control structures.
i'm also use this script to build a web
because this script can reduce any error,
if there is user input wrong link. Thank you*/

$link=$_GET[link];
?>
<?php
if (!$link) {
?>
<?php include('module/home.php'); ?>
<?php
}
else if ($link==$link) {
?>
<?php
$file = 'module/'.$link.'.php';
if (file_exists($file)) { // check file exists
include('module/'.$link.'.php');
}
else {
echo not_found();
}
?>
<?php
}
else {
?>
<?php echo not_found(); ?>
<?php
}
?>

0 new messages