标签: apache

HttpConnection包

我想从apache下载httpConnection类,但我找不到链接,还需要知道如何导入它以及在我拥有类文件的位置.

java apache connection http

-3
推荐指数
1
解决办法
553
查看次数

php 5.3.2 - $ _get $ _post无效

我使用php和mysql支持在我的localhost上运行apache服务器.唯一的问题是,那$_GET并且$_POST根本不起作用.

这是我的html文件:

<html>
<body>
<form action="message.php" method="GET">
Enter your message here: <input type="text" name="msg" size="30">
<input type="submit" value="Send">
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

这是我的message.php文件:

<?php
$input = $_GET('msg');
echo "$input";
?>
Run Code Online (Sandbox Code Playgroud)

如果我在我的html中的文本输入字段中键入"blablabla",它会将我重定向到[localhost] /message.php?msg=blablabla,这很好但是php给了我一个空页面.我检查了[localhost] /message.php?msg=blablabla的源代码,但它只有一个空部分和一个空部分.

我犯了什么错误或者这是一个错误吗?

php apache post get localhost

-3
推荐指数
1
解决办法
1066
查看次数

使用 mod_rewrite 清理 URL

我的网站用户个人资料页面是

http://website.com/profile?name=test
Run Code Online (Sandbox Code Playgroud)

我正在使用 get 方法来获取变量名称, 我试图使上面的 url 被清理,例如,

http://website.com/test
Run Code Online (Sandbox Code Playgroud)

我的 .htaccess 内容

RewriteEngine On
RewriteBase /creatorsink/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]
RewriteRule ^([a-z]+)/?$ profile.php?name=$1 [L,QSA]
Run Code Online (Sandbox Code Playgroud)

有没有办法通过选择获取名称来做到这一点?

apache .htaccess mod-rewrite

-3
推荐指数
1
解决办法
2127
查看次数

我怎么知道.htaccess文件是否正常工作?

我使用这个htaccess url mywebsite.com/xyz/search.html

这里xyz是root中的一个文件夹

在.htaccess中使用此URL的代码

# enable apache modRewrite module #
RewriteEngine On

RewriteBase /

RewriteRule ^([^//]+)/?(^/*)?.ht(m?ml?)$ index.php?page=$1 [L,QSA]
Run Code Online (Sandbox Code Playgroud)

现在我希望这 xyz/search.html 是击中网址xyz/index.php?page=search

但是这个:

RewriteRule ^([^//]+)/?(^/*)?.ht(m?ml?)$ index.php?page=$1 [L,QSA])
Run Code Online (Sandbox Code Playgroud)

代码不起作用..对此有任何想法......

php apache .htaccess mod-rewrite

-3
推荐指数
1
解决办法
1万
查看次数

什么是"标题之前的脚本输出结束"?

我想用PERL做一个简单的测试.我编写了input.html并将其放在hgi文件夹中,并将其放在cgi-bin中的output.cgi中.两者都在XAMPP文件夹中,使用mac.这也是使用apache.

HTML文件

<!doctype html>
<html lang="en">
  <body>
<form action="/cgi-bin/output.cgi" method="post">
Enter Fahrenheit: <input type="text" name="fahrenheit" /><br />
Enter Distance in Miles: <input type="text" name="distance" /><br />        
<input type="submit" value="Convert!" />
</form>
Run Code Online (Sandbox Code Playgroud)

这是用户按"转换"时应显示的CGI文件

#!/usr/bin/perl -w

use strict;
use warnings;

use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";


#### read form data
my $fahrenheit = param('fahrenheit');
my $distance = param('distance');


#### do the math
my $celcius = ($fahrenheit * 18.8) + 32;
my $kilometers = $distance * 1.60934;

#### display results …
Run Code Online (Sandbox Code Playgroud)

apache xampp permissions perl cgi

-3
推荐指数
1
解决办法
2万
查看次数

-4
推荐指数
1
解决办法
2613
查看次数

如何从网址中删除.php扩展名

.htaccess我的服务器网站文件夹中没有文件,所以我.htaccess从我网站的其他网站粘贴文件并将规则写为

RewriteRule ^terms-of-use$ terms-of-use.php [L]
RewriteRule ^privacy-policy$ privacy-policy.php [L]
Run Code Online (Sandbox Code Playgroud)

但不起作用.

apache mod-rewrite

-4
推荐指数
1
解决办法
83
查看次数

如何从url隐藏参数

我有这个网址:
http:// localhost:8080/cgi-bin/gestionale/dashboard.pl?user = santaclaus
我的问题是如何转换它:
http:// localhost:8080/cgi-bin/gestionale/dashboard. pl?user = santaclaus

http:// localhost:8080/cgi-bin/gestionale/dashboard.pl

我可以在我的.htaccess文件中使用重写规则进行修改吗?如果答案是肯定的,请解释我该怎么做.

apache perl .htaccess

-4
推荐指数
1
解决办法
437
查看次数

PHP显示服务器的当前日期/时间

当我使用这个脚本时:

    <?php
print strftime('%c');
?> 
Run Code Online (Sandbox Code Playgroud)

我明白了

Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/www/apache22/data/virtual/midterm/boballo.php on line 3
Sun Jul 6 20:41:17 2014
Run Code Online (Sandbox Code Playgroud)

我想要显示的是服务器的当前日期/时间并将其打印到PHP脚本.我以为服务器(freebsd)会设置时区.如何显示服务器的当前日期并使用php脚本打印?

php apache freebsd

-5
推荐指数
1
解决办法
1311
查看次数

github上的所有android代码都可以免费使用

出于商业目的而未在我们的应用程序中提及其许可证?

例如android第三方库?

我可以在我的应用程序中使用Android第三方库而不显示其作者姓名吗?

我想使用第三方库,但不希望任何人知道他们的名字!

apache android licensing github android-library

-5
推荐指数
1
解决办法
812
查看次数

厨师Apache2配方在服务器构建期间失败

我一直在重建我们的Chef主服务器以在T2实例中运行,这意味着将其移至VPC。旧的主机正在运行11.10.4,而我一直在修改的新主机正在运行11.16.4。我已经接近让它在VPC内构建适当的服务器,但是它挂了设置Apache的电话。

ohai [reload_users]操作重新加载[2014-11-25T08:13:58-06:00]错误:运行插件时遇到错误:#<Ohai :: Exceptions :: AttributeNotFound:无此类属性:'passwd'

具体来说,它似乎在配方中不喜欢此代码

if node[:etc][:passwd][:apache] == nil
    ohai "reload_users" do
        plugin "passwd"
        action :reload
    end
end
Run Code Online (Sandbox Code Playgroud)

我环顾四周,在ohai上找到了这篇文章

在Ohai 6中,passwd插件(名为passwd.rb)设置了'current_user'属性,为了使用此数据,需要知道这一事实。
require_plugin(“ passwd”)

在Ohai 7中,用户交互现在基于属性名称。仅指定要为其收集数据的属性的名称。Ohai 7找出需要哪些插件,然后收集数据。

在Ohai 7中,无需知道底层详细信息即可发现current_user
取决于'currentuser'

看起来接近......但如果我取代它失败plugin "passwd"depends 'currentuser'它也会失败。

我正在使用Ohai 7(gem list显示ohai (7.4.0))。我不是一个红宝石家伙,所以那里有点模糊。这段代码到底应该做什么?这是自定义添加到旧Opscode食谱的仓库中的。我们的食谱主要由不再为我们公司工作并且也不知道答案的其他人撰写。如果我将其注释掉,它可以很好地工作并安装Apache,但是如果不理解它就删除一些代码,我将不予理miss。

ruby apache chef-infra chef-recipe ohai-gem

-6
推荐指数
1
解决办法
392
查看次数