PHP在<script type =“text / javascript”> </ script>中获取内容
Im trying to get the content what is is the javascript script tag.
<script type="text/javascript"> [CONTENT HERE] </script>
currently i have something like this:
$start = preg_quote('<script type="text/javascript">', '/');
$end = preg_quote('</script>', '/');
preg_match('/ '.$start. '(.*?)' .$end.' /', $test, $matches);
But when i vardump it, its empty
douzhong1907
2017/10/30 13:20- php
- 点赞
- 收藏
- 回答
满意答案
3个回复
