JS 和PHP 数据库操作在一个页面
<?
require ("config.php3");
?>
<?
if($submit)
{
//echo $action;
//if($action=='update')
if($id)
{
$query="update banner_place set adv_plc='$adv_plc',size='$size',description='$description' where id=$id";
$message="update banner place ";
}
else
{
$query="insert into banner_place (adv_plc,size,description) values ('$adv_plc','$size','$description')";
$message="added banner place " ;
}
$my_res = mysql_db_query($phpAds_db, $query) or mysql_die();
// Header("Location: banner.php3?pageid=$pageid&message=".urlencode($message));
// Header("Location: banner.php3");
echo "<script>window.location.href ='admin.php3?pageid=$pageid&message=$message'</script>";
exit();
}
?>
<?
相关文档:
<?php
// An array of allowed users and their passwords
$users = array(
'harryf' => 'secret',
'tom' => 'mypwd'
);
// If there's no Authentication header, exit
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Basic real ......
PHP确实十分容易编写。但是PHP也有一些十分严重的缺陷。为什么PHP不适合于比小型业余网站更大的网站呢? 1. 对递归的不良支持 递归是一种函数调用自身的机制。这是一种强大的特性可以把某些复杂的东西变得很简单。有一个使用递归的例子是快速排序(quicksort)。不幸的是,PHP并不擅长递归。Zeev,一个PHP开发人 ......
使用的是ADODB库,需要有OCI8库.
<?php
//require("adodb5/adodb-exceptions.inc.php");
require("adodb5/adodb.inc.php");
$conn = NewADOConnection("oci8");
$conn->Connect($url, $user, $password, $service_name);
$rs;
try {
$rs = $conn->Execu ......
PHP作为一种服务器端的脚本语言,象编写简单,或者是复杂的动态网页这样的任务,它完全能够胜任。但事情不总是如此,有时为了实现某个功能,必须借助于操作系统的外部程序(或者称之为命令),这样可以做到事半功倍。
那么,是否可以在PHP脚本中调用外部命令呢?如果能,如何去做呢?有些什么方面的顾虑呢?相 ......