Is there any way t开发者_运维问答o enable JavaScript on the client machine using PHP?
You can't do such a thing. It's impossible to modify user preferences stored on their local machines.
You can ask them to enable javascript if it's not the case using the noscript tag.
No, as neither the HTTP protocol or HTML have a feature to do this. To have a website able to enable JavaScript would also be a breach of security. There is also no guarentee that the users browser has JavaScript.
You may wish to look at the <noscript> tags, which allow you to display a message to the user when JavaScript is not active.
精彩评论