dongpu3898 2016-03-02 17:48 采纳率: 100%
浏览 90

getPage()函数不起作用

I am following Object oriented programming tutorial.... I did exact same as tutorial but it doesn't work for me at Url class in getPage() function and it does not show any error.

... As tutorial it will come with error.php which is in pages folder, if I don't have any page created at pages folder or that page should come that will I create at pages folder

public static function getPage() {
    $page = self::$_folder.DS.self::cPage().".php";
    $error = self::$_folder.DS."error.php";
    return is_file($page) ? $page : $error;
}

Here is my code... Have any suggestion... Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dtdb99743 2016-03-03 15:44
    关注

    To run PHP, you need to start a server.

    There are many ways to do this. One popular solution is to install mamp which has a free version.

    Once you have mamp installed there will be a default htdocs directory. You can change this to where your php code is by going to preferences web server and changing document root:

    Document Root Preferences

    To see if any php errors have occured, you'll need to go to the logs which can be located: /Applications/MAMP/logs/php_error.log

    Note: This is OS X

    评论

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类