php - using exec to append data to file not in current directory -


i trying set little script allow php append data file

the file etc/httpd/conf/httpd.conf

i want to automatically add data file vhost use...

echo shell_exec('echo "hello" >> /etc/httpd/conf/httpd.conf'); 

the code not working, , not outputting anything

i have feeling due working directory,

i welcome other ways of doing this... must able called via php window

probably it's permission problem. permissions on httpd.conf? can check using ls -l /etc/httpd/conf/httpd.conf if you're on linux/mac.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -