我正在使用Xampp来测试我的perl cgi脚本.当我打开cgi脚本时,css似乎不适用于该页面.我在html文件中尝试了完全相同的代码,它工作正常,这表明html链接到正确的位置,以找到CSS.
$self->{content}=<<HTML;
<!DOCTYPE html>
<html>
<head>
<title>$title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="../css/additional.css" rel="stylesheet" media="screen">
<script src="http://code.jquery.com/jquery.js"></script>
<script src="../js/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<a class="brand" >Bridge : $env </a>
<ul class="nav">
<li><a href="#"><i class="icon-upload"></i>upload</a></li>
<li><a href="#"><i class="icon-search"></i>Search</a></li>
<li><a href="#"><i class="icon-cog"></i>Admin</a></li>
</ul>
</div>
</div>
<div class="container">
...
</div>
</body>
</html>
HTML
Run Code Online (Sandbox Code Playgroud) 我已经通过 XAMPP 安装了 php,现在我想安装 Phalcon dll,我必须将它添加到我的 php.ini
我做了所有 Phalcon 安装步骤,但我没有发现它不起作用;我什至删除了我的 php.ini 内容并重新启动了 Apache,但 php 仍在运行!
PHP 可以在没有 php.ini 的情况下工作吗?
我正在使用一个ubuntu服务器:512MB RAM/1 CPU我想通过调整php,mysql内存限制以适合我的服务器规范来增加我的wordpress网站速度.我正在使用xampp服务器.
上下文:已安装的XAMPP(Apache,MySQL + PHP 5.4)
PHP运行正常,例如:
<?php
echo "PHP has been installed successfully!";
?>
Run Code Online (Sandbox Code Playgroud)
打印PHP已成功安装!
但是当我使用T_OBJECT_OPERATOR时,PHP无法重新计算它,例如:
<?
include_once('inc.start.php');
include_once('inc.login.php');
if ($logeado) {
$seccion = 'index';
include_once('cms/lib/class.control.actividades.php');
$control = new ControlActividades($web, $db, $sesion);
$accion = $web->getParam('accion', 'listar');
include_once('inc.finish.php');
?>
Run Code Online (Sandbox Code Playgroud)
服务器打印
getParam('accion', 'listar');
include_once('inc.finish.php');?>
Run Code Online (Sandbox Code Playgroud)
编辑:我发现该文件不是以 <?php
该项目不是我的,其他人已经完成,他是如何让它工作的?
我刚刚搜索了文档找到它,我删除了<hr class="cmdbar"></hr>它但它仍然存在!你们有没有看到别的什么?
<?php print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<font face="Segoe UI">
<body>
<script type="text/javascript">
/*function detectBrowser()
{
var browser = navigator.appCodeName;
if (browser!="Mozilla") {document.location.href="noaccess.php"; alert(browser);}
}
detectBrowser();
*/
</script>
<title>Second</title>
<link rel="stylesheet" type="text/css" href="allCSS.css"/>
<center>
<!--<img align="right" src="logo.png" id="headerimg"/>-->
<input type="image" id="headerimg" src="logo.png" align="right" onclick="toggleh();"/>
<ul align="center" class="">
<div class="menu">
<ul class="nav">
<li><strong><a href="index.php">Home</a></strong>
<ul>
<li><a href="games.php">Games</a></li>
<li><a href="browse.php">Browse</a></li>
<li><a href="catalogue.php">Catalogue</a></li>
<li><a href="forum.php">Forums</a></li>
</ul>
</li>
<li><strong><a href="games">Games</a></strong>
<ul> …Run Code Online (Sandbox Code Playgroud) 我正在使用XAMPP
DocumentRoot是C:/ xampp/htdocs
我想将文件上传到C:/ DATA/SLIDES
这是可能的(不改变Apache的默认DocumentRoot).
我想添加一个新的XAMPP安装.
PHP INI文件是默认设置.我需要对PHP.INI进行哪些更改才能使其工作?
我想用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) 我试图从文本框中插入一个值到SQL表中.虽然当我将文本框留空时,它会添加一个空白值,然后导致其余的表单函数无效.
我希望if语句检查$ animal是否为空,什么都不做,如果$ animal中有内容,则执行插入表.
不太确定放在哪里放什么???
if ($animal = " ") {
} else if ($animal = "???"){
insertTable("INSERT INTO $table(name) VALUE ('".$animal."')");
Run Code Online (Sandbox Code Playgroud)
24 - 27行是这个
sub insertTable {
$statement = shift (@_);
$dbh->do($statement);
} # sub
Run Code Online (Sandbox Code Playgroud) 我们知道xampp用于web开发,但xampp中perl文件夹的用途是什么?为什么perl文件夹包含在xampp中?我是初学者,不知道perl文件夹,但我知道perl是一种编程语言.
谁能说出来?