Home > Backend Development > PHP Tutorial > html的<a>标签能否直接指向php的自定义函数?解决方案

html的<a>标签能否直接指向php的自定义函数?解决方案

WBOY
Release: 2016-06-13 10:03:56
Original
1303 people have browsed it

html的标签能否直接指向php的自定义函数?
比如:

function thefunc()
{
  echo "thefunc被调用了";
}

?>
调用php函数


我点一下"调用php函数",那么系统就调用了thefunc()。
能否实现这样的效果,即点击标签包含的文字,就可以执行php自定义函数。

------解决方案--------------------
不可能的……
两种解决方法:一是使用javascript,二是链接到一个php页去执行。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template