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 justtext_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, likehttp://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 fromhttp://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.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报