"PHP" / Говнокод #7201 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
function f_includes(&$text){

		//REPLACE FILE INCLUDES LINKS
 		$regex = '/{(ФАЙЛ=)\s*(.*?)}/i';
		$matches = array();
		preg_match_all( $regex, $text, $matches, PREG_SET_ORDER );		
		foreach ($matches as $elm) {	
			$elm[0] = str_replace('{', '', $elm[0]);
			$elm[0] = str_replace('}', '', $elm[0]);			
			parse_str( $elm[0], $args );
			$file=@$args['ФАЙЛ'];	
			if ($file){		
				$output = getLink($file);			
			} else { $output = ''; }
			$text = str_replace('{ФАЙЛ='.$file.'}', $output, $text );	
		}

		return true;
}

Что за п##дец. InstantCMS.

Запостил: invision70 invision70, (Updated )

Комментарии (2) RSS

Добавить комментарий

Где здесь C++, guest?!

    А не использовать ли нам bbcode?


    8