0
我的服務器上有兩個虛擬主機。一個「網絡」和一個「移動」。我可以在「users」目錄下的「web」中查看文件,但是我無法上傳或創建目錄下的目錄?上傳文件到Apache別名目錄和子目錄
例如:
<img src='http://m.domain.com/users/imgs/sample.png' /> this is viewable
//this is not possible
<?php
mkdir("users/newDir"); //fails
$img = file_get_contents("http://images.devshed.com/fds/belts/ds_forums.gif");
$file = "users/newDir/sample.gif";
file_put_contents($file, $img); //fails
$img = file_get_contents("http://images.devshed.com/fds/belts/ds_forums.gif");
$file = "users/sample.gif";
file_put_contents($file, $img); //fails
?>
我已經欠我的移動虛擬以下指向的文件在我的「網絡」:
<VirtualHost *:80>
ServerName domain.com
ServerAlias m.domain.com
DocumentRoot "C:/Apache/mobileroot"
<Directory "C:/Apache/mobileroot">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
Alias /users/ "C:/Apache/webroot/users/"
<Directory "C:/Apache/webroot/users/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>