HTML:
<div id="signUpError"></div>
JS:
<script type="text/javascript">
function showSignUpError(message) {
document.getElementById('signUpError').innerHTML="<div class='alert alert-danger'>"+message+"</div>";
}
</script>
PHP:
$error="this is error"
如何致电showSignUpError($error)
答案 0 :(得分:0)
试试这段代码:
php.ini
首先尝试,但可能需要引用文字:
zend_extension = "php_xdebug-2.3.3-5.6-vc11-x86_64.dll"
xdebug.remote_autostart = 0
xdebug.profiler_enable = 0
xdebug.profiler_output_dir = "C:\PHP\tmp"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_mode=req
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.trace_output_dir = "C:\PHP\tmp"
xdebug.auto_trace = 0
xdebug.var_display_max_depth = 3
xdebug.remote_connect_back = 0
请注意,这只会在页面加载时运行一次。
如果您希望在与用户交互时调出PHP代码,那么您应该查看AJAX: