这段代码如何通过PHP脚本运行,请给个示例
想做成脚本定时运行并且让网页调用,希望高手给改成PHP脚本,先谢谢!(以下希望弄成2个脚本,我好参照)第一脚本
rm /home/hts/xmltv.log
rm /home/hts/epg.xml
touch /home/hts/xmltv.log
echo "Download starting..." >> /home/hts/xmltvlog/xmltv.log
echo "Time: $(date)" >> /home/hts/xmltvlog/xmltv.log
wget -O /home/hts/epg.xml https://
cat /home/hts/epg.xml | sudo socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock
echo "" >> /home/hts/xmltv.log
echo "Time: $(date)" >> /home/hts/xmltv.log
echo "EPG Updated successfully." >> /home/hts/xmltv.log
第二个脚本
cat /home/hts/epg.xml | sudo socat - UNIX-CONNECT:/home/hts/.hts/tvheadend/epggrab/xmltv.sock