PHP $ _ SERVER [DOCUMENT_ROOT] problem $ _ SERVER ['document _ root'] value is empty, but there is actual data on the phpinfo () test page, where is the problem with my program? Or configuration problems?
/*
Test Procedure
Call
$_server[' php_self ') #当前正在执行脚本的文件名, related to document root.
$_server[' argv '] #传递给该脚本的参数.
$_server[' argc '] #包含传递给程序的命令行参数的个数 (if run in command-line mode).
$_server[' Gateway_interface ') #服务器使用的 the version of the CGI specification. For
$ _ SERVER ['php _ SELF '] # File Name of the script being executed, which is related to document root.$ _ SERVER ['argv'] # parameters passed to the script.$ _ SERVER ['argc '] # contains the number of command line parameters passed to the Program (
Recently learning WordPress, using Appserv to build a PHP development environment on WindowsFind information on the Web to modify the root directory of the Apache server, compare learning, and then this recordWhen you install Apache, the system is
Found on the internet about the changes to the Apache server root directory of information, comparative study, and then this record
When Apache is installed, the system is given a default file root directory.
If you think it is inconvenient to have
Solution:
Method One:
Change the directory or file's policy type to httpd_sys_content_t.# chcon-r-h-t httpd_sys_content_t/www/web/You can then use the Ls-laz command to view the policy type of the file directory.
Method Two:
Disable SELinuxLinux
Org. springframework. beans. factory. beandefinitionstoreexception: ioexception parsing XML document from class path resource [beans. XML]; Nested exception is Java. io. filenotfoundexception: Class path resource [beans. XML] cannot be opened
The following error occurs when xfire is integrated with spring:
Information: loading spring root webapplicationcontext 2010-3-12 10:52:44 Org. apache. catalina. core. standardcontext listenerstart critical: exception sending context initialized
Solution:
Method One:
Change the directory or file's policy type to httpd_sys_content_t.# chcon-r-h-t httpd_sys_content_t/www/web/You can then use the Ls-laz command to view the policy type of the file directory.
Method Two:
Disable SELinuxLinux
Summary of php application path variables. Local server, domain name d.com, root path D: phpnowvhostsd.com. yii, with the requeir_onceaa.php file in the x. php code in the root directory, and aa. php requeir_onceabb.php
Local server, domain
Because the PHP file needs to be handled by the WEB server, you need to inform Dreamweaver of the location of the test server. You also need to tell Dreamweaver the correct URL to use when testing the file. The following instructions assume that you
See an ngx_static example of a module service disk file. We use the following configuration fragment:Location/{root/var/www/;}At the same time, in the local /var/www/ directory to create two files, a file index.html is called, the content is a line
Use Dreamweavercs6 to define a PHP Site. because PHP files need to be processed by the Web server, you need to inform Dreamweaver of the location of the test server. You also need to tell the Dreamweaver test file to use the correct URL. Assume that
Local server, domain name http://d.com, root path D:\phpnow\vhosts\d.com.yii, relative root directory owning file/x.php code requeir_once/a/a.php, and/a/ a.php and requeir_once/a/b/b.php ./x.php
$_server["Http_host"]: "d.com"//HOST of the
[Nginx] common traps and errors: nginx traps
Many people may encounter a trap. The following lists the problems we often see and explains how to solve them. The # nginx IRC channel on Freenode is frequently discussed.1. Permissions
Never use 777
IntroductionTransfer from http://www.pandacademy.com/%E5%A6%82%E4%BD%95%E5%9C%A8ubuntu-14-04-lts%E4%B8%8A%E8%AE%BE%E7%BD%AEnginx%E8%99 %9a%e6%8b%9f%e4%b8%bb%e6%9c%ba/#i-3When using an Nginx Web server, you can use server blocks (similar to a virtual
[Nginx] common traps and errorsMany people may encounter a trap. The following lists the problems we often see and explains how to solve them. The # nginx IRC channel on Freenode is frequently discussed. 1. Do not use the 777 permission for
XPath Introduction
XPath is a W3C standard. It is designed to locate nodes in the xml1.0 or xml1.1 document node tree. Currently, xpath1.0 and xpath2.0 are available. Xpath1.0 became the W3C standard in 1999, while xpath2.0 standard was established
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.