方法一:
echo "<script>alert('提示内容')</script>";
方法二:
echo '<script language="JavaScript">;alert("这是";location.href="index.htm";</script>;';
里面的location.href="index.htm"表示你点击消息框的确定按钮后将要转向的页面。如果不用去掉就可!
方法一:
echo "<script>alert('提示内容')</script>";
方法二:
echo '<script language="JavaScript">;alert("这是";location.href="index.htm";</script>;';
里面的location.href="index.htm"表示你点击消息框的确定按钮后将要转向的页面。如果不用去掉就可!
<?php// 检查是否提交了表单if ($_SERVER['REQUEST_METHOD'] === 'POST') { // 设置 AP...
str_replace()函数$text = "这是第一行\n这是第二行\n这是第三行";$text = str_replace(array("\r", "\...
trim()函数方法$str = " Hello World! ";$trimmed = trim($str);echo $trimmed;preg_replace()函数方法$s...
ctype_alnum() 函数ctype_alnum() 函数检查字符串中的所有字符是否都是字母或数字。$char = 'a'; /...
fread函数方法<?php$file_path = "test.txt";if(file_exists($file_path)){$fp = fopen($file_path,"r");$s...