A framework for the close relationship between PHP and JavaScript