PHP拒绝来自的var

编程入门 行业动态 更新时间:2024-10-18 20:24:07
本文介绍了PHP拒绝来自的var_dump,打印等输出数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在此刻WAMP的服务器,并且已经花费了近30分钟试图我的项目将如何以及为什么没有指定任何输出PHP数据搞清楚。

起初,我认为这是因为我有这output_buffering禁用的的.htaccess 文件,所以我删除了。尽管如此,没有骰子。然后,我检查了我的的httpd.conf ,四处寻找关键字,如的display_errors , output_buffering 等,并似乎都检查了就好了。

然后,我试图通过把使用error_reporting(E_ALL)在我的脚本打开所有的错误报告。再次,没有骰子。

当然,大多数的我做了我重新启动我的WAMP的服务器,仍然还没有真正得到任何东西显示在屏幕上的更改之后。需要注意的是,虽然我的打印和报表的var_dump似乎没有工作,我的错误,肯定会出现没有问题。

我的PHP版本是5.3.10 PHP

因此​​,我在这里有点不知所措的;我该怎么办?

修改

值得注意的

一些事情:的phpinfo()工作得很好,而且WAMPServer GUI是存在的。我能看到我的配置设置,项目PHPINFO等,都来自那里。

此外,当我试图检查从Firefox的元素,我什么也没得到。同样的,查看源代码。

编辑2

声音告诉我,这可能是的Aptana Studio中,这是造成这个问题:当我运行PHP文件,例如,它带我到 127.0.0.1:8020 ,在我的本地主机实际上是本地主机:8080 。当然,在8020版本中,我得到的是写在code只是输出。

是否有任何人谁的过类似的经历与此?

文件,code等。

的 test.php的的

< PHPinclude_once(包括/ database.php中');用途包括\\数据库;$数据库=新的数据库('evolve_admin');$解析度= $数据库 - > fetchRow(    evol_users',    阵列('user.id','user.email','user.firstname'),    阵列('user.email'=>'test1234@test'));后续代码var_dump($水库); //< - 无;没有窥视。打印__LINE__; //< - 没有任何显示。?>

的php.ini

注意:当我尝试发布此引擎收录是行不通的。 SORRY!

的的httpd.conf 的

##这是主要的Apache HTTP服务器的配置文件。它包含的#配置指令,让服务器的指令。#见<网址:HTTP://httpd.apache/docs/2.2>了解详细信息。#特别是,看到#<网址:HTTP://httpd.apache/docs/2.2/mod/directives.html>#每个配置指令的讨论。##不要只是简单的阅读说明书不求甚解# 他们做什么。他们在这里只起提示。如果你不确定#咨询在线文档。你被警告了。##配置和日志文件名:如果文件名指定为许多服务器的控制文件#开始/(或驱动器:/为Win32)中,#服务器将使用绝对路径。如果文件名不*不*开始#以/,ServerRoot的值是prepended - 如此日志/ foo.log#ServerRoot的带设置为C:/ Program Files文件/阿帕奇软件基金会/的Apache2.2将是由PTED间$ P $#服务器为C:/ Program Files文件/阿帕奇软件基金会/的Apache2.2 /日志/ foo.log。##注意:在文件名的,则必须使用正斜杠#而不是反斜杠(例如,C:/阿帕奇而不是C:\\阿帕奇)。#如果省略了盘符,驱动器上Apache.exe所在#将默认使用。建议您始终提供#在绝对路径明确的驱动器盘符,以避免混乱。##ServerRoot的:目录树的顶部根据该服务器的#配置,错误和日志文件保存。##不要在目录路径的末尾添加斜线。如果你点在非本地磁盘#ServerRoot的,一定要指向锁文件指令#在本地磁盘。如果您希望分享多个相同的ServerRoot#的httpd守护进程,则需要改变至少与LockFile和PIDFILE。#ServerRoot的C:/wamp/bin/apache/apache2.2.21##Listen:允许你将Apache绑定到特定的IP地址和/或#端口,而不是默认的。另见的<&虚拟主机GT;#指令。##更改为侦听特定的IP地址,如下所示#prevent阿帕奇从glomming到所有绑定的IP地址。##Listen 12.34.56.78:80听8080##动态共享对象(DSO)支持##为了能够使用其建成一个DSO你模块的功能#必须把相应的`的LoadModule'线在这个位置使其中包含的#指令实际可用_before_使用它们。静态编译模块(在httpd -l列出)不需要在此装载#。##示例:#的LoadModule foo_module模块/ mod_foo.so#的LoadModule actions_module模块/ mod_actions.so的LoadModule alias_module模块/ mod_alias.so的LoadModule asis_module模块/ mod_asis.so的LoadModule auth_basic_module模块/ mod_auth_basic.so#LoadModule auth_digest_module模块/ mod_auth_digest.so#LoadModule authn_alias_module模块/ mod_authn_alias.so#LoadModule authn_anon_module模块/ mod_authn_anon.so#LoadModule authn_dbd_module模块/ mod_authn_dbd.so#LoadModule authn_dbm_module模块/ mod_authn_dbm.so的LoadModule authn_default_module模块/ mod_authn_default.so的LoadModule authn_file_module模块/ mod_authn_file.so#LoadModule authnz_ldap_module模块/ mod_authnz_ldap.so#LoadModule authz_dbm_module模块/ mod_authz_dbm.so的LoadModule authz_default_module模块/ mod_authz_default.so的LoadModule authz_groupfile_module模块/ mod_authz_groupfile.so的LoadModule authz_host_module模块/ mod_authz_host.so#LoadModule authz_owner_module模块/ mod_authz_owner.so的LoadModule authz_user_module模块/ mod_authz_user.so的LoadModule autoindex_module模块/ mod_autoindex.so#LoadModule cache_module模块/ mod_cache.so#LoadModule cern_meta_module模块/ mod_cern_meta.so的LoadModule cgi_module模块/ mod_cgi.so#LoadModule charset_lite_module模块/ mod_charset_lite.so#LoadModule dav_module模块/ mod_dav.so#LoadModule dav_fs_module模块/ mod_dav_fs.so#LoadModule dav_lock_module模块/ mod_dav_lock.so#LoadModule dbd_module模块/ mod_dbd.so#LoadModule deflate_module模块/ mod_deflate.so的LoadModule dir_module模块/ mod_dir.so#LoadModule disk_cache_module模块/ mod_disk_cache.so#LoadModule dumpio_module模块/ mod_dumpio.so的LoadModule env_module模块/ mod_env.so#LoadModule expires_module模块/ mod_expires.so#LoadModule ext_filter_module模块/ mod_ext_filter.so#LoadModule file_cache_module模块/ mod_file_cache.so#LoadModule filter_module模块/ mod_filter.so#LoadModule headers_module模块/ mod_headers.so#LoadModule ident_module模块/ mod_ident.so#LoadModule imagemap_module模块/ mod_imagemap.so的LoadModule include_module模块/ mod_include.so#LoadModule info_module模块/ mod_info.so的LoadModule isapi_module模块/ mod_isapi.so#LoadModule ldap_module模块/ mod_ldap.so#LoadModule logio_module模块/ mod_logio.so的LoadModule log_config_module模块/ mod_log_config.so#LoadModule log_forensic_module模块/ mod_log_forensic.so#LoadModule mem_cache_module模块/ mod_mem_cache.so的LoadModule mime_module模块/ mod_mime.so#LoadModule mime_magic_module模块/ mod_mime_magic.so的LoadModule negotiation_module模块/ mod_negotiation.so#LoadModule proxy_module模块/ mod_proxy.so#LoadModule proxy_ajp_module模块/ mod_proxy_ajp.so#LoadModule proxy_balancer_module模块/ mod_proxy_balancer.so#LoadModule proxy_connect_module模块/ mod_proxy_connect.so#LoadModule proxy_ftp_module模块/ mod_proxy_ftp.so#LoadModule proxy_http_module模块/ mod_proxy_http.so的LoadModule rewrite_module模块/ mod_rewrite.so的LoadModule setenvif_module模块/ mod_setenvif.so#LoadModule speling_module模块/ mod_speling.so#LoadModule ssl_module模块/ mod_ssl.so#LoadModule status_module模块/ mod_status.so#LoadModule substitute_module模块/ mod_substitute.so#LoadModule unique_id_module模块/ mod_unique_id.so#LoadModule userdir_module模块/ mod_userdir.so#LoadModule usertrack_module模块/ mod_usertrack.so#LoadModule version_module模块/ mod_version.so#LoadModule vhost_alias_module模块/ mod_vhost_alias.so的LoadModule php5_moduleC:/wamp/bin/php/php5.3.10/php5apache2_2.dll<!IfModule mpm_netware_module><!IfModule mpm_winnt_module>##如果你想的httpd作为一个不同的用户或组运行,则必须运行#的httpd以root最初,它会切换。##用户/组:用户/组运行httpd的名称(或#NUMBER)。#它通常是很好的做法,建立一个专门的用户和组#运行的httpd,与大多数的系统服务。#用户守护进程集团守护进程< / IfModule>< / IfModule>#主服务器配置##本节中的指示成立了由'主'使用的值#服务器,这是为了响应不是由一个处理的所有请求#<虚拟主机>定义。这些值也为默认值#任何<虚拟主机>容器可能会在文件中定义后面。##所有这些指令可能会出现内部<虚拟主机>集装箱,#在这种情况下,这些默认设置将被覆盖的#虚拟主机被定义。###的ServerAdmin:你的邮件地址,当服务器的问题,应该是#电子邮件发送。这个地址显示在服务器生成的页面,如#作为一个出错文档。例如admin@your-domain#管理员的ServerAdmin @本地##ServerName指定Apache用于识别自身的名字和端口。#通常可以自动确定,但我们建议您指定#它明确地启动时prevent问题。##如果你的主机没有注册DNS名,在这里输入IP地址。#服务器名本地主机:8080##的DocumentRoot:目录外面,你会为你的#文件。默认情况下,所有的请求都从这里开始,但#符号链接和别名可用于指向其他位置。#的DocumentRootC:/ WAMP /网络/##每到Apache访问的目录可相对于配置#到服务和功能被允许和/或残疾#目录(及其子目录)。##首先,我们配置的默认是一个非常严格的一套# 特征。#<目录/>    有FollowSymLinks    设置AllowOverride无    为了否认,允许    所有拒绝< /目录>##注意,从这一点你一定要明确允许#特别是功能启用 - 所以,如果事情不工作的#你所期望的,请确保您已专门启用它#以下。###这将改变到你设置的DocumentRoot。#<目录C:/ WAMP /网络/>    #    在Options指令#可能的值是无,全部,    #或任意组合:    #指标包括了FollowSymLinks SymLinksifOwnerMatch ExecCGI多视图    #    #注意,多视图必须显式的指定---所有选项    #它不给你。    #    #Options指令既复杂又重要。请参见    #httpd.apache/docs/2.2/mod/core.html#options    # 了解更多信息。    #    选择了FollowSymLinks索引    #    #设置AllowOverride控制那些被放置在.htaccess文件。    #它可以是全部,无,或关键字的任意组合:    #选项的FileInfo AuthConfig极限    #    所有的AllowOverride    #    #控制谁可以从服务器获得资料。    ##onlineoffline标签 - 不要删除    为了拒绝,允许    所有拒绝    从127.0.0.1允许< /目录>##DirectoryIndex的:它设置Apache将服务如果一个目录中的文件#请求。#< IfModule dir_module>    DirectoryIndex的的index.php index.php3 index.htm的index.html的< / IfModule>##以下行prevent的.htaccess和htpasswd文件被#Web客户端查看。#< FilesMatch^ \\ HT。>    为了允许,拒绝    所有拒绝    满足所有< / FilesMatch>##错误日志:错误日志文件的位置。#如果没有指定&LT内的ErrorLog指令,虚拟主机>#集装箱,与该虚拟主机的错误信息会#记录在这里。如果你做* *定义一个℃的错误日志文件,虚拟主机>#集装箱,该主机的错误会被那里,没有记录在这里。#错误日志C:/wamp/logs/apache_error.log##LogLevel的:控制记录在error_log中的消息的数量。#可能的值包括:调试,信息,通知,警告,错误,暴击,#警报,EMERG。#LOGLEVEL警告< IfModule log_config_module>    #    #下面的指令定义格式别名搭配使用    #CustomLog指令(见下文)。    #    的LogFormat%H%L%U%T \\%r \\%> S%B \\%{Referer的}​​ I \\\\%{用户代理} I \\组合拳    的LogFormat%H%L%U%T \\%r \\%>%B的共同    < IfModule logio_module>      #您需要启用mod_logio.c使用%I和%氧      的LogFormat%H%L%U%T \\%r \\%> S%B \\%{Referer的}​​ I \\\\%{用户代理} I \\%I%Ocombinedio    < / IfModule>    #    #访问日志(通用日志文件格式)的位置和格式。    #如果你没有定义&LT内的任何访问日志文件;虚拟主机>    #容器,它们将被记录在这里。反之,如果你做* *    #定义per-<虚拟主机>访问日志文件,交易将是    #记录在其中并没有*在这个文件*。    #    的CustomLogC:/wamp/logs/access.log共同    #    #如果preFER访问,代理和referer信息,日志文件    #(合并日志文件格式),可以使用下面的指令。    #    #CustomLog日志/ access.log的组合拳< / IfModule>< IfModule alias_module>    #    #重定向:允许你告诉客户有关使用文件    #在你的服务器的命名空间存在,但不是现在。客户端    #将在新位置的文档的新要求。    #示例:    #重定向常任/美孚的http://本地主机/条    #    #别名:地图网络路径到文件系统路径,用于    #不DocumentRoot的生活下访问内容。    #示例:    #别名/ webpath /全/文件系统/路径    #    #如果你有一个尾随/上/ webpath则服务器将    #要求它是在URL present。你也有可能    #需要提供<名录及GT;部分,以允许访问    #文件系统路径。    #    #ScriptAlias​​指令:该控制哪个目录包含服务器脚本。    #ScriptAlias​​es是基本上相同别名,除了    在目标目录#文件被视为应用和    #由服务器时请求,而不是作为发送到文档上运行    #客户端。尾部的规则/适用于ScriptAlias​​指令    #指令为别名。    #    ScriptAlias​​指令/的cgi-bin /的cgi-bin /< / IfModule>< IfModule cgid_module>    #    #ScriptSock:在线程服务器,指定路径UNIX    #插槽用于mod_cgid的CGI守护进程进行通信。    #    #Scriptsock日志/ cgisock< / IfModule>##C:/ Program Files文件/阿帕奇软件基金会/的Apache2.2 / cgi-bin目录应改为你的ScriptAlias​​ed#CGI目录存在,如果有配置。#<目录的cgi-bin>    设置AllowOverride无    选择无    为了允许,拒绝    所有允许< /目录>##DefaultType的:默认MIME类型服务器将使用为一个文件#如果不能以其他方式确定的,如文件扩展名。#如果你的服务器主要含有文本或HTML文档,text /纯是#一个很好的价值。如果你的大多数内容是二进制的,如应用程序或图片,你可能希望使用应用程序/八位字节流而不是#防止浏览器,尽管它们是显示二进制文件#文本。#缺省的类型文本/纯< IfModule mime_module>    #    #TypesConfig指向包含映射从列表的文件    #文件扩展名的MIME类型。    #    TypesConfig的conf /的mime.types    #    #将AddType允许您添加或覆盖的MIME配置    在TypesConfig特定的文件类型指定#文件。    #    #AddType应用程序/ x-gzip的.tgz的    #    #AddEncoding允许你有一定的浏览器uncom preSS    #动态信息。注:并非所有浏览器都支持这一点。    #    #AddEncoding幽浮preSS .Z    #AddEncoding的X gzip的。广州.tgz的    #    #如果AddEncoding指令以上是注释掉,那么你    #也许应该确定这些扩展指示媒体类型:    #    将AddType应用程序/ x-COM preSS .Z    将AddType应用程序/ x-gzip的。广州.tgz的    将AddType应用/ X的httpd - PHP的.php    将AddType应用/ X的httpd - PHP .php3    #    #的AddHandler允许你某些文件扩展名映射到处理程序:    #行动无关的文件类型。这些既可以内置在服务器    #或Action指令增加(见下文)    #    #要使用CGI脚本ScriptAlias​​ed指令之外:    #(你还需要为ExecCGI添加到选项指令。)    #    #AddHandler CGI脚本的CGI    #对于类型映射(协商资源):    #AddHandler型地图变种    #    #过滤器允许你来之前,发送到客户端处理的内容。    #    #要解析的.shtml服务器端包含(SSI)文件:    #(你还需要添加包括到选项指令。)    #    #AddType的text / html的.shtml    #AddOutputFilter INCLUDES的.shtml< / IfModule>##mod_mime_magic模块,允许服务器使用来自各种提示该文件本身的#内容以确定其类型。该MIMEMagicFile#指令告诉那里的提示定义所在的模块。##MIMEMagicFile的conf /魔法##可定制的错误响应有三种类型:#1)纯文本2)本地重定向3)外部重定向## 一些例子:#ErrorDocument 500的服务器提出了布布。#ErrorDocument 404 /missing.html#ErrorDocument 404/cgi-bin/missing_handler.pl#ErrorDocument 402 HTTP://localhost/subscription_info.html###EnableMMAP和EnableSendfile:在支持它的系统​​,#内存映射或sendfile的系统调用用于输送#文件。这通常提高服务器性能,但必须#从网络安装发球时被关闭#文件系统,或者对于这些功能的支持,否则是#打破了你的系统上。##EnableMMAP关闭#EnableSendfile关闭#补充配置##在conf /额外/目录中的配置文件可以#包括添加额外的功能或修改的默认配置#服务器,或者你可能只是在这里复制它们的内容,并更改为#必要的。#服务器池的管理(MPM专用)#INCLUDE的conf /额外/的httpd-mpm.conf#多语言错误信息#INCLUDE的conf /额外/的httpd-multilang-errordoc.conf#花式目录列表包括的conf /额外/的httpd-autoindex.conf# 语言设定#INCLUDE的conf /额外/的httpd-languages​​.conf#用户主目录#INCLUDE的conf /额外/的httpd-userdir.conf请求和配置#实时信息#INCLUDE的conf /额外/的httpd-info.conf#虚拟主机#INCLUDE的conf /额外/的httpd-vhosts.conf#本地访问Apache HTTP服务器手册#INCLUDE的conf /额外/的httpd-manual.conf#分布式创作和版本控制(WebDAV)#INCLUDE的conf /额外/的httpd-dav.conf#各个默认设置#INCLUDE的conf /额外/的httpd-default.conf#安全(SSL / TLS)连接#INCLUDE的conf /额外/的httpd-ssl.conf中##注:以下条件必须要present支持#没有SSL开始与没有的/ dev /随机相当于平台#但是静态编译-mod_ssl中。#< IfModule ssl_module>SSLRandomSeed启动内置SSLRandomSeed内置连接< / IfModule>包括C:/ WAMP /别名/ *

解决方案

你试过:

ob_start();后续代码var_dump(在字符串中的var_dump($水库)输出);$ OUT = ob_get_clean();回声$出;

用的var_dump本身没有工作对我来说无论是在WAMP和ob_start / ob_get_clean工作。

I'm running a WAMP server at the moment, and have been spending the past 30 minutes trying to figure out how and why my project won't output any PHP data specified.

At first, I thought that it was because I had an .htaccess file which output_buffering disabled, so I deleted that. Still, no dice. Then, I checked my httpd.conf, looked around for keywords such as display_errors, output_buffering, etc. and all seemed to be checked out just fine.

Then, I tried turning on all error reporting by placing error_reporting( E_ALL ) in my script. Yet again, no dice.

Of course, after most of the changes I have made I've restarted my WAMP server, and still have yet to actually get anything to show up on the screen. Note that, while my print and var_dump statements appear not to work, my errors will definitely show up without a problem.

My PHP version is PHP 5.3.10.

Thus, I'm at a bit of a loss here; what should I do?

Edit

A few more things of note: phpinfo() works just fine, and the WAMPServer GUI is there. I'm able to view my config settings, projects, PHPInfo, etc, all from there.

Also, when I try to inspect the element from firefox, I get nothing. Same with view source.

EDIT 2

Something tells me that it may be Aptana Studio which is causing the issue: when I run the PHP file, for example, it takes me to 127.0.0.1:8020, where my localhost is actually localhost:8080. Of course, on the 8020 version, all I get is just the output of the code written.

Is there anyone who's had similar experiences with this?

Docs, Code, etc.

test.php

<?php include_once( 'includes/database.php' ); use includes\Database; $database = new Database( 'evolve_admin' ); $res = $database->fetchRow( 'evol_users', array( 'user.id', 'user.email', 'user.firstname' ), array( 'user.email' => 'test1234@test' ) ); var_dump( $res ); //<-- nothing; not a peep. print __LINE__; //<-- does not display either. ?>

PHP.ini

NOTE: Pastebin isn't working when I try to post this. SORRY!

httpd.conf

# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:httpd.apache/docs/2.2> for detailed information. # In particular, see # <URL:httpd.apache/docs/2.2/mod/directives.html> # for a discussion of each configuration directive. # # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # Configuration and logfile names: If the filenames you specify for many # of the server's control files begin with "/" (or "drive:/" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "C:/Program Files/Apache Software Foundation/Apache2.2" will be interpreted by the # server as "C:/Program Files/Apache Software Foundation/Apache2.2/logs/foo.log". # # NOTE: Where filenames are specified, you must use forward slashes # instead of backslashes (e.g., "c:/apache" instead of "c:\apache"). # If a drive letter is omitted, the drive on which Apache.exe is located # will be used by default. It is recommended that you always supply # an explicit drive letter in absolute paths to avoid confusion. # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # # Do not add a slash at the end of the directory path. If you point # ServerRoot at a non-local disk, be sure to point the LockFile directive # at a local disk. If you wish to share the same ServerRoot for multiple # httpd daemons, you will need to change at least LockFile and PidFile. # ServerRoot "c:/wamp/bin/apache/apache2.2.21" # # Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 8080 # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule actions_module modules/mod_actions.so LoadModule alias_module modules/mod_alias.so LoadModule asis_module modules/mod_asis.so LoadModule auth_basic_module modules/mod_auth_basic.so #LoadModule auth_digest_module modules/mod_auth_digest.so #LoadModule authn_alias_module modules/mod_authn_alias.so #LoadModule authn_anon_module modules/mod_authn_anon.so #LoadModule authn_dbd_module modules/mod_authn_dbd.so #LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_host_module modules/mod_authz_host.so #LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule autoindex_module modules/mod_autoindex.so #LoadModule cache_module modules/mod_cache.so #LoadModule cern_meta_module modules/mod_cern_meta.so LoadModule cgi_module modules/mod_cgi.so #LoadModule charset_lite_module modules/mod_charset_lite.so #LoadModule dav_module modules/mod_dav.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule dav_lock_module modules/mod_dav_lock.so #LoadModule dbd_module modules/mod_dbd.so #LoadModule deflate_module modules/mod_deflate.so LoadModule dir_module modules/mod_dir.so #LoadModule disk_cache_module modules/mod_disk_cache.so #LoadModule dumpio_module modules/mod_dumpio.so LoadModule env_module modules/mod_env.so #LoadModule expires_module modules/mod_expires.so #LoadModule ext_filter_module modules/mod_ext_filter.so #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule filter_module modules/mod_filter.so #LoadModule headers_module modules/mod_headers.so #LoadModule ident_module modules/mod_ident.so #LoadModule imagemap_module modules/mod_imagemap.so LoadModule include_module modules/mod_include.so #LoadModule info_module modules/mod_info.so LoadModule isapi_module modules/mod_isapi.so #LoadModule ldap_module modules/mod_ldap.so #LoadModule logio_module modules/mod_logio.so LoadModule log_config_module modules/mod_log_config.so #LoadModule log_forensic_module modules/mod_log_forensic.so #LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule mime_module modules/mod_mime.so #LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule negotiation_module modules/mod_negotiation.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule setenvif_module modules/mod_setenvif.so #LoadModule speling_module modules/mod_speling.so #LoadModule ssl_module modules/mod_ssl.so #LoadModule status_module modules/mod_status.so #LoadModule substitute_module modules/mod_substitute.so #LoadModule unique_id_module modules/mod_unique_id.so #LoadModule userdir_module modules/mod_userdir.so #LoadModule usertrack_module modules/mod_usertrack.so #LoadModule version_module modules/mod_version.so #LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule php5_module "c:/wamp/bin/php/php5.3.10/php5apache2_2.dll" <IfModule !mpm_netware_module> <IfModule !mpm_winnt_module> # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group: The name (or #number) of the user/group to run httpd as. # It is usually good practice to create a dedicated user and group for # running httpd, as with most system services. # User daemon Group daemon </IfModule> </IfModule> # 'Main' server configuration # # The directives in this section set up the values used by the 'main' # server, which responds to any requests that aren't handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All of these directives may appear inside <VirtualHost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain # ServerAdmin admin@localhost # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If your host doesn't have a registered DNS name, enter its IP address here. # ServerName localhost:8080 # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "c:/wamp/www/" # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something's not working as # you might expect, make sure that you have specifically enabled it # below. # # # This should be changed to whatever you set DocumentRoot to. # <Directory "c:/wamp/www/"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # httpd.apache/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride all # # Controls who can get stuff from this server. # # onlineoffline tag - don't remove Order Deny,Allow Deny from all Allow from 127.0.0.1 </Directory> # # DirectoryIndex: sets the file that Apache will serve if a directory # is requested. # <IfModule dir_module> DirectoryIndex index.php index.php3 index.html index.htm </IfModule> # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> # # ErrorLog: The location of the error log file. # If you do not specify an ErrorLog directive within a <VirtualHost> # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a <VirtualHost> # container, that host's errors will be logged there and not here. # ErrorLog "c:/wamp/logs/apache_error.log" # # LogLevel: Control the number of messages logged to the error_log. # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn <IfModule log_config_module> # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a <VirtualHost> # container, they will be logged here. Contrariwise, if you *do* # define per-<VirtualHost> access logfiles, transactions will be # logged therein and *not* in this file. # CustomLog "c:/wamp/logs/access.log" common # # If you prefer a logfile with access, agent, and referer information # (Combined Logfile Format) you can use the following directive. # #CustomLog "logs/access.log" combined </IfModule> <IfModule alias_module> # # Redirect: Allows you to tell clients about documents that used to # exist in your server's namespace, but do not anymore. The client # will make a new request for the document at its new location. # Example: # Redirect permanent /foo localhost/bar # # Alias: Maps web paths into filesystem paths and is used to # access content that does not live under the DocumentRoot. # Example: # Alias /webpath /full/filesystem/path # # If you include a trailing / on /webpath then the server will # require it to be present in the URL. You will also likely # need to provide a <Directory> section to allow access to # the filesystem path. # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the target directory are treated as applications and # run by the server when requested rather than as documents sent to the # client. The same rules about trailing "/" apply to ScriptAlias # directives as to Alias. # ScriptAlias /cgi-bin/ "cgi-bin/" </IfModule> <IfModule cgid_module> # # ScriptSock: On threaded servers, designate the path to the UNIX # socket used to communicate with the CGI daemon of mod_cgid. # #Scriptsock logs/cgisock </IfModule> # # "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # <Directory "cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> # # DefaultType: the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain <IfModule mime_module> # # TypesConfig points to the file containing the list of mappings from # filename extension to MIME-type. # TypesConfig conf/mime.types # # AddType allows you to add to or override the MIME configuration # file specified in TypesConfig for specific file types. # #AddType application/x-gzip .tgz # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note: Not all browsers support this. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz # # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 # # AddHandler allows you to map certain file extensions to "handlers": # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories: # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi # For type maps (negotiated resources): #AddHandler type-map var # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI): # (You will also need to add "Includes" to the "Options" directive.) # #AddType text/html .shtml #AddOutputFilter INCLUDES .shtml </IfModule> # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # #MIMEMagicFile conf/magic # # Customizable error responses come in three flavors: # 1) plain text 2) local redirects 3) external redirects # # Some examples: #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 localhost/subscription_info.html # # # EnableMMAP and EnableSendfile: On systems that support it, # memory-mapping or the sendfile syscall is used to deliver # files. This usually improves server performance, but must # be turned off when serving from networked-mounted # filesystems or if support for these functions is otherwise # broken on your system. # #EnableMMAP off #EnableSendfile off # Supplemental configuration # # The configuration files in the conf/extra/ directory can be # included to add extra features or to modify the default configuration of # the server, or you may simply copy their contents here and change as # necessary. # Server-pool management (MPM specific) #Include conf/extra/httpd-mpm.conf # Multi-language error messages #Include conf/extra/httpd-multilang-errordoc.conf # Fancy directory listings Include conf/extra/httpd-autoindex.conf # Language settings #Include conf/extra/httpd-languages.conf # User home directories #Include conf/extra/httpd-userdir.conf # Real-time info on requests and configuration #Include conf/extra/httpd-info.conf # Virtual hosts #Include conf/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include conf/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) #Include conf/extra/httpd-dav.conf # Various default settings #Include conf/extra/httpd-default.conf # Secure (SSL/TLS) connections #Include conf/extra/httpd-ssl.conf # # Note: The following must must be present to support # starting without SSL on platforms with no /dev/random equivalent # but a statically compiled-in mod_ssl. # <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> Include "c:/wamp/alias/*"

解决方案

Have you tried:

ob_start(); var_dump("Var_dump($res) output in a string"); $out = ob_get_clean(); echo $out;

var_dump by itself wasn't working for me either on WAMP and ob_start/ob_get_clean worked.

更多推荐

PHP拒绝来自的var

本文发布于:2023-11-07 23:08:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567689.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:PHP   var

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!