file_exist not working WHEN PLACED inside php function

前端 未结 6 1255
广开言路
广开言路 2021-01-27 15:37

I have searched for almost similar questions but none of those gave me the right answer. I have a fully working file_exist code in if else statement he

6条回答
  •  北海茫月
    2021-01-27 16:03

    You can't call the PHP function from HTML/JS. PHP already finished it's work on server side when HTML/JS start working on the client side.

    About file_exists - it doesn't change it's behavior in- or outside of function. So the problem should be in fil path. MAy be it's bacause you have /Project/events/folder-01/event-01.txt in the 1st case and /Alchemy/events/folder-01/event-01.txt in the 2nd? (Alchemy != Project)

提交回复
热议问题