Ash*_*lue 1 javascript php compiler-construction string
我正在编写一个编译JavaScript框架的PHP脚本.现在我使用以下代码在JavaScript文件中创建换行符,但我猜有更好的方法来做到这一点?
// Line break, can this be written better?
$line_break = '
';
// Get JavaScript files
$js_file_core = file_get_contents('js/core.js', true);
$js_file_timers = file_get_contents('js/timers.js', true);
// Add a line break between files and combine them
$compiled_js = $js_file_core . $line_break . $js_file_timers;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1433 次 |
| 最近记录: |