当前位置:首页 » 编程语言 » 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-08-24 05:36:00 浏览:224
安卓手机wf没网怎么回事 发布:2025-08-24 05:07:08 浏览:975
一直叫痛ftp 发布:2025-08-24 04:42:33 浏览:505
更新数据的sql命令是 发布:2025-08-24 04:42:02 浏览:407
安卓桌面百度有料广告如何取消 发布:2025-08-24 04:41:52 浏览:109
暮色森林服务器我的世界 发布:2025-08-24 04:40:26 浏览:719
算法即是 发布:2025-08-24 04:37:37 浏览:361
时间压缩包 发布:2025-08-24 04:22:04 浏览:73
如何不记住密码 发布:2025-08-24 04:13:06 浏览:670
odex反编译工具 发布:2025-08-24 04:02:15 浏览:710