PHP strip_whitespace() 函数
PHP 教程
· 2019-01-27 14:27:34
实例
返回已删除 PHP 注释以及空白字符的 "test.php" 文件的源代码:
<?php
// PHP comment
/*
* Another PHP comment
*/
echo php_strip_whitespace ("test.php");
?>
// PHP comment
/*
* Another PHP comment
*/
echo php_strip_whitespace ("test.php");
?>
如果您在浏览器窗口选择"查看源代码",则如下所示:
<?php
echo php_strip_whitespace ("test.php"); ?>
echo php_strip_whitespace ("test.php"); ?>
定义和用法
strip_whitespace() 函数返回已删除 PHP 注释以及空白字符的源代码文件。
语法
strip_whitespace(filename)
| 参数 | 描述 |
|---|---|
| filename | 必需。规定文件名。 |
技术细节
| 返回值: | 如果成功则返回已删除 PHP 注释以及空白字符的源代码,如果失败则返回空。注释:在 PHP 5.0.1 之前的版本,该函数只返回空字符串。 |
|---|---|
| PHP 版本: | 5+ |
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
JavaScript Patterns
Stoyan Stefanov / O'Reilly Media, Inc. / 2010-09-21 / USD 29.99
What's the best approach for developing an application with JavaScript? This book helps you answer that question with numerous JavaScript coding patterns and best practices. If you're an experienced d......一起来看看 《JavaScript Patterns》 这本书的介绍吧!
HTML 压缩/解压工具
在线压缩/解压 HTML 代码
Base64 编码/解码
Base64 编码/解码