Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
action_touch_file.php
Package: Generateur_v13.rar [view]
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 2k
Category:
WEB Mail
Development Platform:
PHP
- <?php
- if ($_POST['touch_file_name'])
- {
- $new_file = realpath_alternative($target_folder.$_POST['touch_file_name']);
- if (FALSE == is_file($new_file))
- {
- // from windows browser fix
- $content = str_replace("r",'',$_POST['filecontent']);
- $fp = @fopen($new_file,'w');
- if ($fp)
- {
- fwrite($fp,stripslashes($content));
- fclose($fp);
- echo "<body bgcolor='#CFE3E3'><div class="success_box"><i>Action successfull. file </i>".$_POST['touch_file_name']."<i> has been created</i></div>n";
- }
- else
- echo "<div class="error_box">ERROR! file ".$_POST['touch_file_name']." can't be created</div>n";
- }
- else
- echo "<div class="error_box">ERROR! file ".$_POST['touch_file_name']." already exists</div>n";
- echo "<br><br>n";
- }
- else
- {
- echo "<form action=execute.php method=POST>n";
- echo "<input type=hidden name=action value="".$_POST['action']."">n";
- echo "<input type=hidden name=target_folder value="".$_POST['target_folder']."">n";
- echo "<input type=hidden name=target_type value="".$_POST['target_type']."">n";
- echo "<table border=0>n";
- echo "<tr><th>current folder</th><td>".realpath_alternative($target_folder,true)."</td></tr>n";
- echo "<tr><th>file name</th><td><input type=text name="touch_file_name" value=""></td></tr>n";
- echo "<tr><th>file content</th><td><textarea name=filecontent></textarea></td></tr>n";
- echo "</table>n";
- echo "<input type=submit name=submit value="Create">n";
- echo "</form>n";
- }