这是我用PHP脚本的html:
Run Code Online (Sandbox Code Playgroud)<html> <head> <title>Bob's Auto Parts</title> </head> <body> <h1>Bob's Auto Parts</h1> <table width = 100% > <tr> <?php echo "<td>This is working.</td>"; ?> </tr> </table> </body> </html>
为什么这个输出出现了; ?>.我希望它是'这是有用的'.只要.这是输出
鲍勃的汽车零件
鲍勃的汽车零件
这很有效.";?>
我知道我在这里做错了但却无法弄明白.提前致谢.
我重新构建了我已经运行的代码.我之前的目录结构如下:
以下是正在运行的代码段:
<?php
$pageTitle = "Citee.me";
//include view functions
include ('view/view_functions.inc');
//incldue db functions
include ('model/db_functions.inc');
doHtmlHeader($pageTitle);
doBody();
testMySQL();
doHtmlFooter();
?>
Run Code Online (Sandbox Code Playgroud)
我现在重构了以下代码:
现在我修改了我的index.php代码如下(我注释掉db函数来缩小问题范围):
<?php
$pageTitle = "Citee.me";
//include view functions
include ('/citee/web/view/view_functions.inc');
//incldue db functions
//include ('./model/db_functions.inc');
doHtmlHeader($pageTitle);
//doBody();
//testMySQL();
doHtmlFooter();
?>
Run Code Online (Sandbox Code Playgroud)
我收到错误:
PHP Warning: include(/citee/web/view/view_functions.inc): failed to open stream: No such file or directory in /Library/WebServer/Documents/citee/public/index.php on line …Run Code Online (Sandbox Code Playgroud)