// determine whether the label string img $ AA = ' <P style = "text-indent: 32px;"> <span style = "; font-Family: other lines; font-size: 16px;" > the item a process, the trap ionization associated equipment, piping, lightning grounding, instrumentation, control, and other facilities related to engineering design, technical assistance (professional make relevant conditions, etc.), and the Association of procurement of raw materials, manufacture, pre-assembled, inspection, testing, packaging, transportation, site installation and commissioning, on-site technical services, technical training, inspection, completion of the transfer and so on. It does not include civil construction. </ span> </ P> <P style = "text-indent: 32px;"> <span style = "; font-Family: other lines; font-size: 16px;" > <span style = "font-family : isochron; "> (</ span> 1 <span style =" font-family: isochron; ">) detailed design (processes, equipment, piping, etc.); </ span> </ span> </ P> <P style = "text-indent: 32px;"> <span style = "; font-Family: other lines; font-size: 16px;" > <span style = "font-family: isochron;"> (</ span> 2 <span style = "font-family: isochron;"> ) To provide delivery information, including at least: assembly drawing equipment and related process flow diagrams. </ span> </ span> </ P> <P> & nbsp; </ P> ' ; the dump ( $ AA ); IF (the strpos ( $ AA , '<IMG' )) { // int (913) on the first few characters of the dump ( 'AA'); Die (); } the else { // to false without the dump ( 'BB'); Die (); }
// php reads the image path string img tag
pageContents $ = 'string with img tag' ; $ pageContents = str_replace ( '\ "', '"', $ pageContents ); $ REG = '(.? *) / <img the src + = [\' "] (.? *) [\ ' "] / i' ; preg_match_all ( $ REG , $ pageContents , $ Results ); // print out the $ bb = $ Results [2 ]; dump ( $ bb );
Print out the effect of