मुझे फ़ाइल में लिखने में परेशानी हो रही है, भले ही is_writable()
सत्य लौटाए। बेशक, फ़ाइल मौजूद है और स्पष्ट रूप से पठनीय है।PHP is_writable() सत्य देता है लेकिन file_put_contents() झूठी
$file = "data";
echo file_get_contents($file)."<br>";
echo is_writable($file) ? "is writable<br>" : "not writable<br>";
if (file_put_contents($file, "ghijkl", FILE_APPEND) === FALSE) echo "failed<br>";
echo file_get_contents($file)."<br>";
यहाँ और उत्पादन होता है:: यहाँ कोड है
abcdef
is writable
failed
abcdef
@interlude के बाद काम कर रहा है: यह स्पष्ट नहीं है? – zerkms
http://stackoverflow.com/questions/4917811/file-put-contents-permission-denied – naiquevin
@interlude के डुप्लिकेट की तरह दिखता है: क्या आप कहीं भी '==' देखते हैं? – zerkms