21,597
社区成员
发帖
与我相关
我的任务
分享
#! /bin/sh
./configure \
--host=arm-none-linux-gnueabi \
--prefix=/usr/local/php \
--enable-shared=no \
--disable-shared \
--enable-static=yes \
--enable-sockets \
--disable-all \
--enable-pdo \
--enable-json \
--disable-ipv6 \
--enable-sqlite-utf8 \
--with-libxml-dir=/usr/local/libxml2 \
--with-openssl-dir=/usr/local/openssl/include/openssl \
--with-zlib-dir=/usr/local/zlib \
--with-config-file-scan-dir=/usr/local/appweb \
--with-iconv-dir=/usr/local/libiconv
#这里我之前已经交叉编译并安装了xml2。openssl。zlib。iconv库
#! /usr/local/php/bin/php
<?php
echo "X-Powered-By: PHP/5.5.5\n";
echo "Content-type: text/html\n\n";
?>
<html>
<body>
Hello!
<?php
echo $_SERVER["QUERY_STRING"];
?>
</body>
</html>
#! /usr/local/php/bin/php
<?php
phpinfo();
?>
CGIPath /bin:/usr/bin:/usr/local/php/bin
# SinglePostLimit: The maximum allowable number of bytes in
# a single POST. Default is normally 1MB.
# AddType: adds types without editing mime.types
# Example: AddType type extension [extension ...]
# Uncomment the next line if you want .cgi files to execute from anywhere
#AddType application/x-httpd-cgi cgi
# Redirect, Alias, and ScriptAlias all have the same semantics -- they
# match the beginning of a request and take appropriate action. Use
# Redirect for other servers, Alias for the same server, and ScriptAlias
# to enable directories for script execution.
# Redirect allows you to tell clients about documents which used to exist in
# your server's namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
# Example: Redirect /bar http://elsewhere/feh/bar
# Aliases: Aliases one path to another.
# Example: Alias /path1/bar /path2/foo
Alias /doc /usr/doc
# ScriptAlias: Maps a virtual path to a directory for serving scripts
# Example: ScriptAlias /htbin/ /www/htbin/
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
ScriptAlias /php/ /var/www/
AddType application/x-httpd-cgi php