내 폴더에는 약 500 개의 파일 (html)이 있습니다. 각 파일PHP를 사용하여 여러 파일 찾기 및 바꾸기
<script type="text/javascript"><!--
google_ad_client = "??????";
/* unit1 */
google_ad_slot = "??????";
google_ad_width = 120;
google_ad_height = 90;
//-->
</script>
나는이 코드를 사용하여이
<script type="text/javascript" src="/wp-content/themes/twentyfourteen/open.js"></script>
과 코드 위의 교체하려면이 스크립트를 포함 >>
이 찾고있는 대체 좋다 PHP는하지만 html로 찾아서 바꾸지는 않습니다. 누구나 html 파일을 찾아서 바꿀 수 있습니까?
if(is_file($path) && substr($path, -3)=='php' && substr($path, -17) != 'ChangePHPText.php'){
과 :
와우, 정말 고마워요 (존 C). 당신 말이 맞습니다. ($ path, -3) == 'php'를 ($ path, -3) == 'html'로 변경했지만 ($ path, -3)을 ($ path, -4)로 변경하지 않았습니다. 이런 이유로 내 오류. 다시 감사합니다. – user3772028