|
|
|
|
|
для: human
(25.11.2005 в 08:03)
| |
<?php
function hatsker()
{
echo('This is a function hatsker()<br>');
echo('<a href="index_php.php">Nachalo</a>');
exit();
};
function test()
{
echo('This is a fucntion test()<br>');
echo('<a href="index_php.php">Nachalo</a>');
exit();
};
$ok=isset($_GET['func']);
if ($ok) {
if ($_GET['func'] == "hatsker")
hatsker();
if ($_GET['func'] == "test")
test();
}
echo('<a href="index_php.php?func=hatsker">Function Hatsker</a><br>');
echo('<a href="index_php.php?func=test">Function Test</a>');
?>
|
Вот этот код работает....всем спасибо за помощ..надеюсь кому еще понадобиться | |
|
|
|
|
|
|
|
для: hatsker
(25.11.2005 в 02:52)
| | Вот так будет работать.
<?php
if($func == "hatsker")
hatsker();
else if($func == "test")
test();
else
{
echo('<a href="./index_php.php?func=hatsker">Function Hatsker</a><br>');
echo('<a href="./index_php.php?func=test">Function Test</a>');
}
function hatsker()
{
echo('This is a function hatsker()');
echo('<a href="./index_php.php">Nachalo</a>');
};
function test()
{
echo('This is a fucntion test()');
echo('<a href="./index_php.php">Nachalo</a>');
};
?>
|
| |
|
|
|
|
|
|
|
для: Евгений Петров
(25.11.2005 в 02:14)
| | Не работает почему то....вот мой пример
<?php
function hatsker()
{
echo('This is a function hatsker()');
echo('<a href="http://localhost/index_php.php">Nachalo</a>');
};
function test()
{
echo('This is a fucntion test()');
echo('<a href="http://localhost/index_php.php">Nachalo</a>');
};
echo('<a href="http://localhost/index_php.php?func=hatsker">Function Hatsker</a><br>');
echo('<a href="http://localhost/index_php.php?func=test">Function Test</a>');
?>
|
| |
|
|
|
|
|
|
|
для: hatsker
(25.11.2005 в 00:58)
| | Ну например можно так:
http://somename.com/index.php?func=test
|
А в самом коде проверять:
<?
if($_GET['func'] == "test")
test();
?>
|
| |
|
|
|
|
|
|
| Приветствую всех. У меня ко всем вопрос. У меня в коде есть функция test(). Как мне ее вызвать по сылке...а тоесть http://somename.com/index.php - и далее помоему что то должно идти....но что я не знаю....может кто мне поможет.....На случай если такое невозможно, то как это можно сделать другими методами....Я сделал поиск по форуму, но точного ответа так и не нашел. Спасибо | |
|
|
|
|