传真机一直闪烁显示8PAGES SENT OK是什么意思? 是否是对方没接...
这是用了自己做的主题吧。
在返回repose之前,标签结束之前是不能插入任何东西的。
否则就会报这个错。
而seo的任务就是将关键词插入到标签。
如果你懂编码就要仔细查找代码返回之前对的改动。
如果你不懂编码就不要引入seo.php这个文件,找插件替代seo功能。
wordpress安装现现wp
你的wp-config.php里面, 第一行有个空格或者空行把<?php顶到文件头就好了。
或者你曾经用记事本编辑过那个文件, 下一个editplus或者用dreamweaver之类的编辑器打开把开头有个小点删了就行了。
。
-__________-wordpress的文件都是utf8编码的。
。
LS瞎扯。
。
。
千万不要用记事本打开配置文件
...Warning: Cannot modify header information
综合使用得到的解决方法是 1在页面顶部的php标签中加入ob_start();2在返回的信息下面加入ob_end_flush();这样就可以屏蔽错误信息的现实了另外转一下其他人的方法,也许在其他情况下也会有效If you got this message: "Warning: Cannot modify header information - headers already sent by ...."如果在执行php程序时看到这条警告:"Warning: Cannot modify header information - headers already sent by ...."Few notes based on the following user posts:有以下几种解决方法:1. Blank lines (空白行):Make sure no blank line after 检查有2. Use exit statement (用exit来解决):Use exit after header statement seems to help some people在header后加上exit();header ("Location: xxx"); exit();3. PHP has this annoying problem, if your HTML goes before any PHP code or any header modification before redirecting to certain page, it'll said "Warning: Cannot modify header information - headers already sent by ...." Basically anytime you output to browser, the header is set and cannot be modified. So two ways to get around the problem:3a. Use Javascript (用Javascript来解决): echo " self.location(\"file.php\");"; ?>Since it's a script, it won't modify the header until execution of Javascript.可以用Javascript来代替header。
但是上面的这段代码我没有执行成功... 另外需要注意,采用这种方法需要浏览器支持Javascript.3b. Use output buffering (用输出缓存来解决):... HTML codes ...header ("Location: ....");ob_end_flush();?>This will save the output buffer on server and not output to browser yet, which means you can modify the header all you want until the ob_end_flush() statement. This method is cleaner than the Javascript since Javascript method assumes the browser has Javascript turn on. However, there are overhead to store output buffer on server before output, but with modern hardware I would imagine it won't be that big of deal. Javascript solution would be better if you know for sure your user has Javascript turn on on their browser.就像上面的代码那样,这种方法在生成页面的时候缓存,这样就允许在输出head之后再输出header了。
本站的许愿板就是采用这种方法解决的header问题。
在后台管理或者有时候在论坛,点击一个页面,页顶会出现Warning: Cannot modify header information - headers already sent by....这类语句,造成这个原因是因为setcookie语句的问题。
cookie本身在使用上有一些限制,例如:1.呼叫setcookie的叙述必须放在标签之前2.呼叫setcookie之前,不可使用echo3.直到网页被重新载入后,cookie才会在程式中出现4.setcookie函数必须在任何资料输出至浏览器前,就先送出5.……基於上面这些限制,所以执行setcookie()函数时,常会碰到"Undefined index"、"Cannot modify header information - headers already sent by"…等问题,解决"Cannot modify header information - headers already sent by"这个错误的方法是在产生cookie前,先延缓资料输出至浏览器,因此,您可以在程式的最前方加上ob_start();这个函数。
这样就可以解决了。
4.set output_buffering = On in php.ini (开启php.ini中的output_buffering )set output_buffering = On will enable output buffering for all files. But this method may slow down your php output. The performance of this method depends on which Web server you're working with, and what kind of scripts you're using.这种方法和3b的方法理论上是一样的。
但是这种方法开启了所有php程序的输出缓存,这样做可能影响php执行效率,这取决于服务器的性能和代码的复杂度。
昨天想用PHP写一段下载文件的代码,因为不想得怎么设置HTTP协议就直接到php.net上找header()函数的事例,很多代码,我直接拷贝了一段,header("Content-Disposition: attachment; filename=" . urlencode($file)); header("Content-Type: application/force-download");header("Content-Type: application/octet-stream");header("Content-Type: application/download");header("Content-Description: File Transfer"); header("Content-Length: " . filesize('filetest.txt'));flush(); // this doesn't really matter.$fp = fopen($file, "r");while (!feof($fp)){ echo fread($fp, 65536); flush(); // this is essential for large downloads}fclose($fp);?> 运行了一下发现不行,一直报错:Warning: Cannot modify header information - headers already sent by (output started at E:\xampp\htdocs\test\downloadfile\file_download.php:1) in E:\xampp\htdocs\test\downloadfile\file_download.php on line 3我很看了很久,文件一开始就直接是header代码了,没任何输出怎么会说已有字符输出了呢?后来上网查到别人给的提示,才发现,原来我创建文件的时候是直接用记事本存储为UTF8, 原来这样也会出错----------------以下是引用他人的建议 --------------------方法一:在PHP里Cookie的使用是有一些限制的。
1、使用setcookie必须在标签之前...
如何使用contact form 7
1. 首先是安装,搜索 contact form 7即可找到,选择install并activate it2. 安装完成后,WP后台的左侧会出现一个contact 的菜单,这就是contact form 7的快捷菜单3. 新建表单,在contact菜单下面Add new即可新建表单,填好名字如Inquiry,保存即可。
4. Form的设置, Form里面是表格的元素的设置,默认生成的有your name, your email, subject, your message,你也可以根据需要点击FORM顶部的相关菜单,添加相应的功能,如URL等,方法:把光标放置到一个空行,点击URL,会弹出一个窗口设置:required field 视需要打勾或不打勾Name 保持默认即可Default value 填上your websiteuse this text as the placehold of the field, 打上勾this requires the author's URL 不打勾其他的暂时不填, 然后点insert tag,即可插入到表格中了,然后点击SAVE。
你可以根据需要添加其他的一些表单模块。
5. MAIL设置,这里是设置相关的发信息资料,如收到邮件的格式,发送人和收件人邮箱,邮件的标题等6. Message设置,这里面是一些提示信息文字的设置,一般保持默认即可7. Additional settings:这里面可以增加一些扩展的代码,下文会讲述到常用的一些应用。
8. 如何调用Contact form 7表单:当以上设置好以后,把标题下面的一段代码(shortcode)复制,并粘贴到post 或page或portfolio的编辑框里面,然后点update即可完成添加。
完成以后,可以做一个测试,看是否发送成功。
9. Bluehost空间上的网站使用CF7的常见问题及解决方法:询盘无法发送成功或无法收到,如下图所示SOLUTIONS:注:BLUEHOST上的网站不支持第三方邮箱发送系统邮件,所以如果装了SMTP插件则必须删掉才可以正常使用Step1假如你的工作企业邮箱为sales@xxx.com, 那么在CF7表单中将收件人邮箱设置为inquiry@xxx.com,发件人邮箱设置为wordpress@xxx.com,Step2到BH后台-hosting-email下面去添加3个网站域名后缀的email账号,分别是sales@xxx.com,inquiry@xxx.com, wordpress@xxx.com (无论你的企业邮箱在哪里,这里都必须要添加(不影响本身邮箱的使用),如果你的企业邮箱本身挂在BH上面了,那应该不会出现此问题),如下图Step3到bluehost后台 DOMAINS-ZONE EDITOR页面,找到MX(mail exchanger), 点击下面的more,勾选local mail exchanger,并点击changeStep 4到BLUEHOST后台-hosting -email中选择forwarding 并点击add email forwarder,在address to forward中填上inquiry,在forward to this address中填上你的实际工作企业邮箱,如sales@xxx.com或 XXX@GMAIL.COM都可以,并点击SUBMIT。
只要按以上步骤设置,即可成功发送询盘并收到询盘,亲测有效。
10.如何实现发件人的IP追踪和询盘页面的标题,URL等信息,可以在mail菜单下面的message body后面加上以下代码可以实现:[_remote_ip]:发送者当前的IP[_url]: 询盘表单所在的页面[_post_title]:询盘表单所有页面的名称全部的代码可以查看这里 http://contactform7.com/special-mail-tags/11. 询盘发送如何实现页面的跳转:在Additional settings里面加上以下代码(全部复制,如果不成功,则有可能是里面标点不对,一定要保证代码里面的所有标点符号为英文状态下的标点)on_sent_ok: "location = 'http://example.com/';"把example.com换成你跳转后的页面URL,保存,即可实现发送询盘后跳转。
这样便于进行GA的转化设置。
12. 常用询盘表单的代码参考:将以下代码放到 contact form 7第一个选项FORM里面,保存;就可以调用到这个询盘表单了,这是我常用的一个。
We will answer your email shortly![text* your-name placeholder "Your name*"][email* your-email placeholder "Email Address*"][text your-subject placeholder "Your website*"][textarea your-message placeholder "Give us your need as specific as possible*"][submit "Send"]效果如图:13. 配套插件:Contact form DB这个插件的作用时,当用户通过你的CF7等发询盘的时候,无论是是否发送成功,这个询盘的内容都可以被记录下来,非常好用,可以防止无法发送询盘或无法收到邮件导致的询盘丢失。
转载请注明出处51数据库 » wordpress on sent ok