从另一个php文件中的函数调用另一个php文件 [英] Call another php file from a function in another php file

查看:117
本文介绍了从另一个php文件中的函数调用另一个php文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在学校网站项目上工作。我没有PHP的经验。

首先转到波纹管图像URL。



转到此图片链接: http://www.freeimagehosting.net/newuploads/ijcdw.jpg [ ^ ]



如果查看上面的图片,我想你可以理解我想问的内容,比如我想在另一个php文件中激活一个函数时在一个php文件中更改一个属性..

请帮我学习我的学校项目。谢谢

Hi, Im working on a school website project. i have no much experience with PHP.
first go to the bellow image URL.

GO TO THIS IMAGE LINK : http://www.freeimagehosting.net/newuploads/ijcdw.jpg[^]

If you check above image, i think you can understand what i want to ask, like that i want to change a attribute in one php file when fire a function in another php file..
please help me for my school project. thanks

推荐答案

没有调用文件这样的概念。在PHP中,文件可以通过包含来重用(是的,PHP是非常原始的语言)。请参阅:

http://php.net/manual/en/function.include .php [ ^ ],

http://www.php.net/manual/en/function .include-once.php [ ^ ],

http://www.php.net /manual/en/function.require.php [ ^ ],

http:// www .php.net / manual / en / function.require- once.php [ ^ ]。



参见:http://www.w3schools.com/php/php_includes.asp [ ^ ]。



-SA
There is not such concept as "call a file". In PHP, files are reused by inclusion (yes, PHP is pretty primitive language). Please see:
http://php.net/manual/en/function.include.php[^],
http://www.php.net/manual/en/function.include-once.php[^],
http://www.php.net/manual/en/function.require.php[^],
http://www.php.net/manual/en/function.require-once.php[^].

See also: http://www.w3schools.com/php/php_includes.asp[^].

—SA


这篇关于从另一个php文件中的函数调用另一个php文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆