Can a client view server-side PHP source code?

前端 未结 7 1831
小鲜肉
小鲜肉 2020-12-01 23:17

I\'m developing a PHP application that has to respond to request from several clients, and I thinks \"Can any of the clients see the PHP code that I\'m writing?\".

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 00:06

    No. Assuming you've installed a L/UAMP server properly, or aren't printing out (echo, print_r, etc.) and of the guts of your code, the PHP will be processed and the logic or HTML it's meant to output will be used on the page, not visible.

    N.B. If there isn't an 'index' in a directory or a proper .htacess file, an Apache server will show a list of files in the directory, which can be downloaded and reviewed.

提交回复
热议问题