一个最基础的Hello World问题! <?=$hello?>d等同于<? echo $hello;?>$hello是个对象怎么能ECHO呢 呵呵 错我提示很明显 这么写MVC还不如去看看源码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 哈哈,$hello 是对像,你直接输出当然有问题 楼上两位大哥,PHP里对象应该如何输出? 能否详细点? 小弟菜 test.func.php: <?php Class Hello { function HelloWorld() { return "Hello World!!!"; } } ?> control.php <?php require_once ('test.func.php'); $Hello = new Hello(); $aHello=$Hello ->HelloWorld(); include('view.html'); ?> view.html <html> <head> <title> </title> </head> <body> <?=$aHello?> </body> </html> 请教 htaccess rewriterule 抓取数据 一个 变量 链接自身的问题 关于PHP聊天室添加表情功能的问题 第十行变量错误 phpmyadmin在本机狂暴刷新,Apache/2.0.54 (Win32) PHP/4.4.0RC1 我快疯啦 初学这—php文件如何运行?? 请教一个php和js结合的问题。 <IMG SRC=1.gif>为什么打不开图片呢 请教一个字符集的问题 APACHE 升级问题 如何用正则表达式提取所有的图片标签以及相应的src?
<?php
Class Hello
{
function HelloWorld()
{
return "Hello World!!!";
}
}
?> control.php
<?php
require_once ('test.func.php');
$Hello = new Hello();
$aHello=$Hello ->HelloWorld();
include('view.html');
?> view.html
<html>
<head>
<title> </title>
</head>
<body>
<?=$aHello?>
</body>
</html>