douyu1656 2012-12-01 15:33
浏览 56
已采纳

我看不到wordpress .php文件?

I installed WAMP server on Windows XP - it worked. I installed Wordpress 3.4.2 into www.wordpress - no problem. In Dreamweaver CS5 I created a site with www.wordpress as root folder, and assigned a local test server - no problem.

The, in Dreamweaver, I opened twentyten theme - index.php - and pressed <kbd>F12</kbd> to see the page in Firefox - and got:

Fatal error: Call to undefined function get_header()... - on line 16

This is a completely new and clear wordpress installation. Why is the function (get_header) - undefined? To check the server I copied another .php file into the same folder - <kbd>F12</kbd> - it works.

  • 写回答

3条回答 默认 最新

  • doucang2831 2012-12-01 17:50
    关注

    When you click the <kbd>F12</kbd> in Dreamweaver , it will open the file in the browser using the windows local path file system to the file, which wont work as you should run the file on localhost.

    Using <kbd>F12</kbd> file will open as C:\\Wamp\Wordpress\index.php.

    But you should rather open it as localhost/wordpress/.

    Also, you should be running index.php that is in wordpress folder and not the index file that is in themes folder.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 win2012 iscsi ipsec
  • ¥15 封装的 matplotlib animation 不显示图像
  • ¥15 python摄像头画面无法显示
  • ¥15 关于#3d#的问题:d标定算法(语言-python)
  • ¥15 cve,cnnvd漏洞扫描工具推荐
  • ¥15 图像超分real-esrgan网络自己训练模型遇到问题
  • ¥15 如何构建全国统一的物流管理平台?
  • ¥100 ijkplayer使用AndroidStudio/CMake编译,如何支持 rtsp 直播流?
  • ¥15 用js遍历数据并对非空元素添加css样式
  • ¥15 使用autodl云训练,希望有直接运行的代码(关键词-数据集)