English 中文(简体)
PHP将不会通过迅速执行的指令书写档案,而将在浏览器执行时书写。
原标题:PHP will not write file to directory via command prompt executed script but will write when executed in browser

我将在普伦普指挥部执行这一指挥。

php C:xampphtdocsdl.php

These are the properties of my htdocs directory:

“entergraph

However, under the sharing tab, I have write permissions under all users:

“entergraph

I ve restarted apache after each permission modification with no success. How do I fix this?

我的笔记本通过APIC下载XML文件,并将XML文件写进服务器根名录。 当我执行www.mydomain.com/dl.php时,下载的XML被写进了根名录;然而,当我通过指挥台执行PHP(dl.php)档案时,它不会将下载的档案汇入根名录。

PHP file:

$today = date("F j, Y").".xml";
$ch = curl_init ("");

$fp = fopen("ipod_car_connectors2.xml", "w");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp);
最佳回答
  The solution was to escape slashes
问题回答

修改如下:

$fp = f open ("c:xampphtdocsipod_car_jointors2.xml, “w”);





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签