PHP error object not found

前端 未结 2 1641
梦如初夏
梦如初夏 2021-01-25 21:19

I have created a small PHP file which displays the name of text files in a directory as first.txt, second.txt, third.txt. On clicking on a

2条回答
  •  日久生厌
    2021-01-25 21:52

    Your link doesn't point correctly. When using xampp, the link should be relative to your htdocs folder, not your entire path:

    /Learning/ListingFiles/first.txt
    

    Note, that this would be the same link path you would use if your website were on the net using a domain.

    It works when you use file:: because that explicitly states that the path is a file on your computer.

提交回复
热议问题