页面最顶部使用include后,会显示空白行,css也不正常,求解决方法
页面是utf-8编码
编辑器:dreamweaver 页面属性已经勾选了 包括Unicode签名(BOM)(s)
这样页面顶部会显示一行空白,查看源代码什么都正常:
<?php include_once("inc.php");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
回复讨论(解决方案)
确定不是代码产生的对吧? 如果确定不是代码产生的话,换个编辑器用utf-8无bom头编码保存一下。
文件编码如果是utf-8,头部会占用3个字符,文件改成无bom看看。
“dreamweaver 页面属性已经勾选了 包括Unicode签名(BOM)(s)”
在DW中,按CTRL+J,编码,然后不要勾选此项,PHP本身是无法识别BOM头信息的,所以会出现COOKIE、SESSION、空白异常等状况
感谢,取消 包括Unicode签名(BOM)(s) 这个确实变正常了!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

Warning messages in the Tomcat server logs indicate potential problems that may affect application performance or stability. To effectively interpret these warning information, you need to pay attention to the following key points: Warning content: Carefully study the warning information to clarify the type, cause and possible solutions. Warning information usually provides a detailed description. Log level: Tomcat logs contain different levels of information, such as INFO, WARN, ERROR, etc. "WARN" level warnings are non-fatal issues, but they need attention. Timestamp: Record the time when the warning occurs so as to trace the time point when the problem occurs and analyze its relationship with a specific event or operation. Context information: view the log content before and after warning information, obtain

VS Code can be used to write Python and provides many features that make it an ideal tool for developing Python applications. It allows users to: install Python extensions to get functions such as code completion, syntax highlighting, and debugging. Use the debugger to track code step by step, find and fix errors. Integrate Git for version control. Use code formatting tools to maintain code consistency. Use the Linting tool to spot potential problems ahead of time.

Common problems and solutions for Hadoop Distributed File System (HDFS) configuration under CentOS When building a HadoopHDFS cluster on CentOS, some common misconfigurations may lead to performance degradation, data loss and even the cluster cannot start. This article summarizes these common problems and their solutions to help you avoid these pitfalls and ensure the stability and efficient operation of your HDFS cluster. Rack-aware configuration error: Problem: Rack-aware information is not configured correctly, resulting in uneven distribution of data block replicas and increasing network load. Solution: Double check the rack-aware configuration in the hdfs-site.xml file and use hdfsdfsadmin-printTopo

VS Code can run on Windows 8, but the experience may not be great. First make sure the system has been updated to the latest patch, then download the VS Code installation package that matches the system architecture and install it as prompted. After installation, be aware that some extensions may be incompatible with Windows 8 and need to look for alternative extensions or use newer Windows systems in a virtual machine. Install the necessary extensions to check whether they work properly. Although VS Code is feasible on Windows 8, it is recommended to upgrade to a newer Windows system for a better development experience and security.

Server restart when using Docker on a GPU server is caused by the following reasons: CUDA version conflict driver issue Memory allocation error Solution: Make sure the CUDA version matches the update driver limit GPU memory allocation

This article introduces the construction and configuration methods of Nginx. 1. Install Nginx: Use sudoyumininstallnginx on CentOS, use sudoapt-getinstallnginx on Ubuntu, and start with sudosystemctlstartnginx after installation. 2. Basic configuration: Modify the /etc/nginx/nginx.conf file, mainly modify the listen (port) and root (site root directory) instructions in the server block, and after modification, use sudosystemctlrestartnginx to restart and take effect. 3. Virtual host configuration: in nginx.co

nginx is a lightweight, non-blocking web server and reverse proxy, commonly used for front-end proxy, load balancing, and caching. Its relationship with a web server is usually: Front-end proxy: nginx handles requests and forwards them to the back-end server. Load Balancer: nginx distributes requests to multiple backend servers. Caching: nginx caches frequently accessed files for performance.
