douzhan2027 2010-07-03 09:45
浏览 82
已采纳

如何使用PHP从任何自托管的Wordpress博客页面读取和写入本地目录?

I want to read and write text files to /data/filename.txt using php. This functionality works fine on the main page, but if I click the Previous Entries button (which switches to page 2), the php script does not seem to be present (as the Flash files are unable to access it).

  • 写回答

1条回答 默认 最新

  • duanbo6871 2010-07-03 14:58
    关注

    If I understand your site correctly, your Flash tries to load data from http://www.consolebias.com/text_poll.php. You probably coded this link as just text_poll.php in your Flash file. This works on the homepage, but not on a page that has a URL that looks like it comes from another directory, like http://consolebias.com/page/2 (even if it is a "fake" directory, the browser, where Flash runs, doesn't know that). Here, the Flash object tries to load the data from http://consolebias.com/page/text_poll.php, which doesn't exist.

    If you change the reference of text_poll.php to /text_poll.php, it will always load it from the root, and it should work.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?