我用php页面创建了一个简单的网站。我的所有页面都位于同一个目录中: /var/www/;index.php页面与此类似:
<?php
include ("Header.php");
include ("Menu.php");
include ("Content.php");
include ("Footer.php");
?>
当所有这些php文件都在同一个目录中时,网站运行良好。例如,如果我在/var/www/NewFolder目录中插入页面Menu.ph
我有一个php脚本:我把一个网站列表放在一个文本区域中,然后php脚本检查网站是关闭还是打开。我的问题是:当一个网站宕机时,脚本会显示一个错误,并停止使用列表中的其余部分:
Warning: fsockopen() [function.fsockopen]: unable to connect to http://SITEDOWN.com:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /home/checklist/public_html/checklist.php (1) : e
我有两个网站,一个是drupal,另一个是基于php的,我需要在登录之前限制php网站的内容。一旦用户登录到drupal网站,php网站也应该使用来自drupal website.is的用户,这是可能的吗?如何让用户登录到外部网站。
更新了此问题的解决方案。使用此脚本访问其中的drupal用户
<?php
chdir('/var/www/');/*This should be the drupal base directory.This is more important.*/
require_once './includes/bootstrap.inc'