General Community > Scripting Help
Learn PHP
Wezz6400:
--- Quote from: [Unknown] on August 22, 2003, 07:28:36 PM ---
--- Quote from: Aquilo on August 22, 2003, 07:26:02 PM ---oh [unknown] is always so right!
--- End quote ---
I don't deserve such high praise - and I am so very often wrong too.
-[Unknown]
--- End quote ---
That's not true! You're always right! But then you are wrong here, which means you are not always right, which means you're right here after all, which means you're always right. But then you are wrong here, which means you are not always right, which means you're right here after all, which means you're always right... ;D
Big P:
I just like the way I did it with PHPNews. Here's some modified code of what I did:
--- Code: --- include_once('pages.php');
/* Place the function names in an Array */
$Array = array(
'search',
'contact',
'links',
'news',
'pictures',
'downloads');
/* If action doesn't exist, do the main() function */
if (!in_array($_GET['action'], $Array, TRUE))
{
main();
}
else
{
$_GET['action']();
}
--- End code ---
Obviously, each section above is in its own function, but it could be easily modified to open up *.txt files with content in them, plus it's as secure as you're likely to get.
Aquilo:
I just went with the in_array approach in one of my scripts.
what is the advantage of using the strict argument if it's in there it's true if not false?
Navigation
[0] Message Index
[*] Previous page
Go to full version