Home > php教程 > php手册 > body text

用PHP+java实现自动新闻滚动窗口_php基础

WBOY
Release: 2016-05-17 09:07:05
Original
1336 people have browsed it

show.php源代码:

if ($action=="cp"){
echo"


  

滚动菜单资料输入端


  

    

文字一:  
      
      链接一:
      
    


    

文字二:  
      
      链接二:  
      
    


    

文字三:  
      
      链接三:  
      
    


    

文字四:  
      
      链接四:  
      
    


    

文字五:  
      
      链接五:  
      
    


    

  
      
      
    


  

";exit;}
if ($action=="edit"){
$wname="data.txt";#数据保存文件,属性666
$writeurl="$t1

$t2

$t3

$t4

$t5

";
$fp=fopen($wname,"w");
$ww=fputs($fp,$writeurl);
if ($ww){echo 文件写入成功;}else{echo 写入失败;}
exit;}
$wname="php-bin/data.txt";#由于是在页面调用,这里必须填写页面和程序相对路径或者绝对路径!
$fa=fopen($wname,"r+");
$wwww=fread($fa,filesize($wname));
echo "
";
?>

使用时先要建立一个名为data.txt的空白文件放在show.php的同一级目录下,然后在页面里使用include调用即可!
show.php?action=cp及可以进行设置,当然,因为没有密码保护,你可以把cp改成其他文字! 
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!