当前位置:首页 » 编程语言 » phpstart

phpstart

发布时间: 2024-09-19 00:15:48

A. php中ob_start是什么功能

ob是output buffering的简称,就是输出缓冲区。如果使用了ob_start函数,那么之后的输出内容(echo等)就不进行实际输出,而是存入缓冲区里面,随后可以使用ob_flush实际输出、ob_clean删除、ob_get_contents获得内容保存到静态文件等。

使用输出缓冲区有两个主要的好处:一是可以在输出一些内容之后在设置header(例如cookie等),使得程序设计的逻辑性变得简单;二是可以对缓冲区里面的输出内容撤销、删除、压缩、保存到文件等操作。

相关的操作是使用一系列的ob_函数来实现的,常用的有下面这些,通过函数名称可以猜测其功能,需要获得详细帮助可以查看文档或者网络搜索:
ob_clean — Clean (erase) the output buffer
ob_end_clean — Clean (erase) the output buffer and turn off output buffering
ob_end_flush — Flush (send) the output buffer and turn off output buffering
ob_flush — Flush (send) the output buffer
ob_get_clean — Get current buffer contents and delete current output buffer
ob_get_contents — Return the contents of the output buffer
ob_get_flush — Flush the output buffer, return it as a string and turn off output buffering
ob_get_length — Return the length of the output buffer
ob_get_level — Return the nesting level of the output buffering mechanism
ob_get_status — Get status of output buffers
ob_gzhandler — ob_start callback function to gzip output buffer
ob_implicit_flush — Turn implicit flush on/off
ob_list_handlers — List all output handlers in use
ob_start — Turn on output buffering
output_add_rewrite_var — Add URL rewriter values
output_reset_rewrite_vars — Reset URL rewriter values

B. PHP Warning: PHP Startup: in Unknown on line 0,这是错在哪了求高手解答

这个是php配置问题,你配置的时候加了 php_zip.dll 扩展,但是你的扩展路径设错了,你设的是相对 路径,在WINDOW 中,这种路径 不好用,如果你的php 是安装 在 d:/server/php中,那个你的这个 扩展路径应该设为 extension_dir = "D:/server/php/ext" 这样,绝对 路径才行。 这个是在php.ini 里面设置的。同时 注意,我的是/ ,这样在 window ,linux 都是正确访问 的。

热点内容
咖啡压缩糖 发布:2025-07-01 05:43:58 浏览:577
云搜卡源码 发布:2025-07-01 05:32:38 浏览:540
华为服务器怎么查ip 发布:2025-07-01 05:15:18 浏览:370
编译器中的数据结构 发布:2025-07-01 05:10:53 浏览:526
云服务器最先跑什么 发布:2025-07-01 05:02:39 浏览:216
微信公众平台手机上传视频 发布:2025-07-01 04:58:53 浏览:417
数控车床螺纹编程实例 发布:2025-07-01 04:46:27 浏览:424
什么是安卓品牌尖货 发布:2025-07-01 04:45:50 浏览:699
写入设备缓存 发布:2025-07-01 04:37:35 浏览:433
小鸡g4怎么连安卓 发布:2025-07-01 04:37:25 浏览:356