包含问题。 [英] problem with include.
问题描述
大家好。
我有一个初学者的问题。
我有这样的剧本:
<?php
$用户= $ _POST [''用户''];
$密码= $ _POST [''密码'']; < br $>
$ Database = $ _POST [''数据库''];
if(isset($ User,$ Password,$ Database))
{
//在这里做点什么
}
else {
echo''一个或者更多的连接参数尚未设置
up。'';
}
?>
现在,我需要使用一些外部函数。我需要包含文件
''common.php''。但是当我这样做的时候:
<?php
包括''common.php'';
$ User = $ _POST [''用户''];
$密码= $ _POST [''密码''];
$数据库= $ _POST [''数据库''];
if(isset($ User,$ Password,$ Database))
{
//在这里做点什么
}
else {
echo''一个或多个连接参数尚未设置
up。' ';
}
?>
没有任何反应。我没有收到任何警告信息,但我的剧本不是运行。$ / b
发生了什么事?
感谢您的建议。
Hello folks.
I have a beginners question.
I have such script:
<?php
$User = $_POST[''User''];
$Password = $_POST[''Password''];
$Database = $_POST[''Database''];
if (isset($User, $Password, $Database))
{
//do something here
}
else {
echo ''One or more of the connection parameters has not been set
up.'';
}
?>
Now, I need to use some external functions. I need to include file
''common.php''. But when I do it like this:
<?php
include ''common.php'';
$User = $_POST[''User''];
$Password = $_POST[''Password''];
$Database = $_POST[''Database''];
if (isset($User, $Password, $Database))
{
//do something here
}
else {
echo ''One or more of the connection parameters has not been set
up.'';
}
?>
nothing happens. I don''t get any warning message but my script is not
running.
What is happening?
Thanks for your advice.
推荐答案
User =
_POST [''User''];
_POST[''User''];
密码=
这篇关于包含问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!