PHP - 使用XML时解析错误

时间:2016-02-18 04:32:47

标签: php xml linux

我有解析错误:在第4行的/Users/.._1.php中解析错误,当我使用以下行时:

var labelXml = "<?xml version=1.0 encoding=utf-8?>";

enter image description here enter image description here

短打开标签始终关闭:

enter image description here

1 个答案:

答案 0 :(得分:1)

问题来自“&lt;?&gt;”你的变种...

我在我的服务器上测试了它,我遇到了同样的问题

你不能用这样的东西吗?

          -----> IBM SDK for Node.js Buildpack v3.0-20160125-1224
                 Based on Cloud Foundry Node.js Buildpack v1.5.4
          -----> Creating runtime environment
                 NPM_CONFIG_LOGLEVEL=error
                 NPM_CONFIG_PRODUCTION=true
                 NODE_ENV=production
                 NODE_MODULES_CACHE=false
          -----> Installing binaries
                 engines.node (package.json):  unspecified
                 engines.npm (package.json):   unspecified (use default)
                 Resolving node version (latest stable) via 'node-version-resolver'
                 Installing IBM SDK for Node.js (4.2.4) from cache
                 Using default npm version: 2.14.12
          -----> Restoring cache
                 Skipping cache restore (disabled by config)
          -----> Checking and configuring service extensions before installing dependencies
          -----> Building dependencies
                 Pruning any extraneous modules
                 Installing node modules (package.json)
                 > loopback-oracle-installer@1.4.2 install /tmp/staged/app/node_modules/loopback-connector-oracle/node_modules/loopback-oracle-installer
                 > node pkginstall.js
                 Downloading/Extracting http://7e9918db41dd01dbf98e-ec15952f71452bc0809d79c86f5751b6.r22.cf1.rackcdn.com/loopback-oracle-Linux-x64-abi46-1.5.0.tar.gz
                 [Error: Prebuilt tarball not found for your node version and platform: http://7e9918db41dd01dbf98e-ec15952f71452bc0809d79c86f5751b6.r22.cf1.rackcdn.com/loopback-oracle-Linux-x64-abi46-1.5.0.tar.gz]
                 > utf-8-validate@1.2.1 install /tmp/staged/app/node_modules/strong-start/node_modules/strong-pm/node_modules/strong-control-channel/node_modules/ws/node_modules/utf-8-validate
                 > node-gyp rebuild
                 make: Entering directory `/tmp/staged/app/node_modules/strong-start/node_modules/strong-pm/node_modules/strong-control-channel/node_modules/ws/node_modules/utf-8-validate/build'
                 CXX(target) Release/obj.target/validation/src/validation.o

          FAILED
          Server error, status code: 400, error code: 170001, message: Staging error: cannot get instances since staging failed

希望这会有所帮助:)