從來沒遇到你這個問題,可能是沒想你這樣嵌套包含文件,liunx和window應該死一樣的,都可以用相對目錄的,看你出現了這個問題,就上網搜了下,果然有這個問題,把網址發出來參考下,看能不能解決你的問題http://hi..com/cwbdde/blog/item/76436b266d51541e8b82a1c6.html http://www.xiaoxiaozi.com/2009/07/29/1264/
2. 怎麼在一個全新的Linux伺服器上通過遠程方式配置PHP運行環境
linux建議安裝lnmp不錯,然後本地下載個putty去遠程式控制制伺服器。
3. linux下php遠程連接oracle
Warning: World-writable config file '/etc/my.cnf' is ignored
解決方案:
This is just a waring and can be ignored but here is the solution how to fix it
這僅僅是一個警告,並且可以被忽略。但下面是修復它的解決方案。
MySQL is deliberately ignoring your config file (my.cnf) as a safety precaution because the file can be over-written by a malicious user.
MySQL有故意忽略你的配置文件(my.cnf)作為一種安全預防措施,因為該文件是能被惡意用戶重寫的。
To see the file』s permissions, use the following command.
查看該文件的許可權,使用如下命令
ls -l /etc/my.cnf
in response, you will see:
你能看到以下結果
-rw-r–r– 1 4998 Apr 2 2010 /etc/my.cnf【注意:此處是最後需要修改成的許可權,而你看到的應該是下面描述的兩種許可權】
If the first part of the line looks like 「-rw-rw-rw-」 or 「rwxrwxrwx」, the file』s permissions are 「World-writable」.
如果第一部分類似「-rw-rw-rw-」 或者 「rwxrwxrwx」,那麼該文件的許可權就是全局可寫的。
To fix this problem, use the following command to change file』s permissions
要修改該問題,使用以下命令更改該文件的許可權:
chmod 644 /etc/my.cnf
4. php include 能包含遠程文件嗎
可以,但是需要修改配置程序。具體如下:
最好檢查一下php.ini中的配置選項allow_url_include,如果為on則可以包含,否則不能包含
; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
allow_url_include = Off
做個簡單的測試,此時allow_url_include的值為Off
測試前配置一下hosts文件,這樣可以在一台電腦上面進行模擬測試
192.168.1.101 www.test1.com
192.168.1.102 www.test2.com
path.php文件內容為:
<?php
echo "This is file path.php<br />\n";
include("http://www.test2.com/research/path/path.php");
?>
path1.php文件內容為:
<?php
echo "This is file path1.php in root directory\n";
?>
執行http://www.test1.com/research/path/path.php,輸出如下
This is file path.php
Warning: include() [function.include]: URL file-access is disabled in the server configuration in E:\myphp\research\path\path.php on line 3
Warning: include(http://www.test2.com/research/path/path.php) [function.include]: failed to open stream: no suitable wrapper could be found in E:\myphp\research\path\path.php on line 3
Warning: include() [function.include]: Failed opening 'http://www.test2.com/research/path/path.php' for inclusion (include_path='.;C:\php5\pear') in E:\myphp\research\path\path.php on line 3
將php.ini中的allow_url_include改為On,重新啟動web伺服器,再次執行http://www.test1.com/research/path/path.php,輸出如下:
This is file path.php
This is file path1.php in root directory
將allow_url_include設為On以後,就可以包含遠程文件了,並且包含的是遠程文件執行的結果。
5. require_once可以引擎遠程php文件嗎
不可以引擎遠程php文件
require_once語句和require語句完全相同,
唯一區別是 PHP 會檢查該文件是否已經被包含過,如果是則不會再次包含。
望採納 Thx
6. 在LINUX下執行PHP遠程調用系統命令問題
探討一下是否理解上有不同之處,
樓主可是想php 能執行伺服器上的命令?
如果說是 php 文件上傳伺服器之後,
因為php 文件已經在伺服器上的命令就相當於要地的命令。
7. 如何通過php連接遠程主機並操作
一、最佳方案是在77機器上安裝apache和php
二、可以通過管道控制使用telnet登錄77號機執行命令並獲取結果,ssh連接本人沒有做過,telnet方法如下:
$f=fopen("telnet://192.168.0.77","rw");
$s=fgets($fp);
fputs($fp,"root");
$s=fgets($fp);
fputs($fp,"pass");
$s=fgets($fp);
fputs($fp,"df -h");
while(!feof($fp)){
$fp=fgets($fp);
echo $s;
}
fclose($fp);
手機輸入真累~~~
8. Linux下遠程管理配置PHP問題
在那台機器上裝個ssh服務,然後ssh上去管理就行啊