Select * from ‘e/class/userfun.php’ where ‘e/class/userfun.php’ = ‘userfun.php’

function user_AddImgAlt($mid,$f,$isadd,$isq,$value,$cs){ $value=stripSlashes($value); $title=stripSlashes($_POST['title']); $title=str_replace('"','',$title); $zz2="/<(img|IMG) (.*?) alt="(.*?) "(. *?) >/is"; $text=preg_replace($zz2,"<\1 \2\4>",$value); $zz1="/<(img|IMG) (.*?) >/is"; $text=preg_replace($zz1,"<\1 alt="{$title}" \2>",$text); return $text; }Copy the code

2. Modify the text field in the data table

The data tables that require this feature need to be modified. The body field is usually newstext (or any other field), and user_AddImgAlt is entered in the field handler text box