Created
April 20, 2012 04:34
-
-
Save pureexe/2426027 to your computer and use it in GitHub Desktop.
จากที่ คุณ max ฝากทำ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>debug</title> | |
| </head> | |
| <body> | |
| <p> | |
| <?php | |
| if($_POST["link"]==1) | |
| { | |
| $data=file_get_contents($_POST["filename"]); | |
| echo "<form id='form1' name='form1' method='post' action=''> | |
| <p>แก้ไฟล์</p> | |
| <p> | |
| </p> | |
| <input name='link' type='hidden' id='link' value='2' /> | |
| <input name='filename' type='hidden' id='filename' value='".$_POST["filename"]."' /> | |
| <input type='text' name='info' id='info' value='".$data."'/> | |
| <p> | |
| <input type='submit' name='submit' id='submit' value='Submit' /> | |
| </p> | |
| </form>"; | |
| } | |
| else if($_POST["link"]==2) | |
| { | |
| $u=fopen($_POST["filename"],'w'); | |
| fwrite($u,$_POST["info"]); | |
| fclose($u); | |
| echo "save complete"; | |
| } | |
| else | |
| { | |
| echo "<form id='form1' name='form1' method='post' action=''> | |
| <p>กรอกชื่อไฟล์</p> | |
| <p> | |
| <input type='text' name='filename' id='filename' /> | |
| </p> | |
| <input name='link' type='hidden' id='link' value='1' /> | |
| <p> | |
| <input type='submit' name='submit' id='submit' value='Submit' /> | |
| </p> | |
| </form>"; | |
| } | |
| ?> | |
| </p> | |
| <p> </p> | |
| <p> </p> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment