php去除html中的script
//去除 script 脚 本
function delScript($string){
$pregfind = array("/<script.*>.*<\/script>/siU",'/on(mousewheel|mouseover|click|load|onload|submit|focus|blur)="[^"]*"/i');
$pregreplace = array('','');
$string = preg_replace($pregfind, $pregreplace, $string);
return $string;
}
主要是 将<script></script> 及中间的部分给 replace 为空了
相关文档:
<?
error_reporting(2047);#报告所有非法的错误
ob_start();
function RMB ($RMB=0,$Format='') {
/*
*/
$RMB=@preg_Replace(
array('/([, ]|¥|0$|)/','/(.){2,}/'),
array('','.'),
$RMB);
if(eregi("[^0-9.]",$RMB))return "非法金额";
if($RMB==0)retur ......
这次我们讲如何用PHP创建数据库以及表,和保存相关配置
先创建一个页面,用来输入相关信息
表单动作为 CreateData.php ,保存为Install.html (因为没有用到PHP,所以可以保存为HTML格式)
然后创建一个PHP文件,保存为CreateData.php ,用来创建数据库和保存相关信息
<?php
if(file_exists("Config.php"))
......
1.avi格式
代码片断如下:
<object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">
<param name="ShowDisplay" value="0">
<param name="ShowControls" value="1">
<param name="AutoStart" value="1">
<param name="Auto ......
<?php
$zip_filename = "testpm.zip";
$zip_filename = key_exists('zip', $_GET) && $_GET['zip']?$_GET['zip']:$zip_filename;
$zip_filepath = str_replace('\\', '/', dirname(__FILE__)) . '/' . $zip_filename;
if(!is_file($zip_filepath))
{
die('文件"'.$zip_ ......
(1)
Warning: mysql_query() [function.mysql-query]: Access denied for user
'ODBC'@'localhost' (using password: NO) in C:\Program Files\Apache
Software Foundation\Apache2.2\htdocs\TM\conn\conn.php on line 32
Warning: mysql_query() [function.mysql-query]: A link to the server could
not be est ......