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
echo php_strip_whitespace ("test.php"); ?>

定义和用法

strip_whitespace() 函数返回已删除 PHP 注释以及空白字符的源代码文件。

语法

strip_whitespace(filename)

参数 描述
filename 必需。规定文件名。

技术细节

返回值: 如果成功则返回已删除 PHP 注释以及空白字符的源代码,如果失败则返回空。注释:在 PHP 5.0.1 之前的版本,该函数只返回空字符串。
PHP 版本: 5+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Hatching Twitter

Hatching Twitter

Nick Bilton / Portfolio Hardcover / 2013-11-5 / USD 28.95

The dramatic, unlikely story behind the founding of Twitter, by New York Times bestselling author and Vanity Fair special correspondent The San Francisco-based technology company Twitter has become......一起来看看 《Hatching Twitter》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具