I’m writting a plugin and there is an option to write css from admin side. Here I need to write css in to a specific file named style.css. For these i have used the php function <?php file_put_contents($file, $data, FILE_TEXT )?>. But it shows error like
file_put_contents(http://localhost/car/wp-content/plugins/networks-inv/tab/style.css) [function.file-put-contents]: failed to open stream: HTTP wrapper does not support writeable connections in C:\wamp\www\car\wp-content\plugins\networks-inv\admin\templates.php on line 49. I cant understand why these errors shows?. Is there any method to write a file in wordpress plugin
You should write the System Path of the file ,not the URL.
You should :