PHP error object not found

前端 未结 2 1651
梦如初夏
梦如初夏 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:47

    Try using

    $dir = "/Applications/XAMPP/xamppfiles/htdocs/learning/";
    

    as your main path with the files in it.

    This full path or "../learning" should get you to the right directory to your files.

    When creating a link you'll want to use "/learning/" + filename to give the path to the file.

    Thanks, MyStream

提交回复
热议问题