如何知道客户端启用了javascript?

I am developing a web application such a way that my codes dynamically generating JavaScript functions using php. If JavaScript is disabled in my client side, my application will not work properly. So I should inform my clients that JavaScript is not enabled in their browser. Is it possible to check using php code?

<noscript> Please enable js</noscript>

Nope, not directly since the PHP code will be evaluated at a server level. It is only possible at clientside, using the <noscript /> HTML tag.

You could try the get_browser method (see php.net), but it is not 100% reliable.

It's not possible directly using PHP - the solution by stecb is a client side solution which will display a message if javascript is not enabled.