Jump to content

thibz21

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

thibz21's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [quote author=thorpe link=topic=104570.msg417266#msg417266 date=1155798995] There is a tutorial on [url=http://www.phpfreaks.com/tutorials/36/0.php]this site[/url] which will show you how to upload an image... the process is the same. [/quote] thanx alot bro... i really appreciate ur help... i'll refer that web u gave me.... any problems i'll get back to u later... i hope u don't mind i asking question... thanx again bro.... later...
  2. thanx... the double quating (") help me to solve the problem to open the file... thanx bro... but i still need to know how this code will work... i mean... i know i made a mistake... i know this won't work because when we accessing the server and the client pc have to send that file to the server to generate the grade into the file and to be send back to client pc... how do i do that?
  3. yes... i need to upload it to server... how to do that?  ???
  4. the whole code is above there.... actually this code will in a server and the client pc will access that page to grade the student according to the marks in the file.... so.... that's the coding about... how am i suppose to do that... i'm just a beginner in PHP... i hope u might help... thanx...
  5. i appreciate ur help... thanx... ur advise worked but still have few problems from: $filename = addslashes($_POST['filename']); i changed to: $filename = $_POST['filename']; and the output was: Warning: file($filename) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\grade.php on line 20 *** hello!! *** *** C:\\Documents and Settings\\user\\Desktop\\navz.txt *** the slashes were less... but there is one more problem... i cannot ignore the whole... //$filename = addslashes($_POST['filename']); because it will not read the filename inserted.... so how? help... thanx...
  6. i'm beginner in PHP and i have some problems here. this is my coding: <? if (isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 0; } if ($page == "1") { $filename = addslashes($_POST['filename']); if ($filename=="") { echo("*** No information given! ***"); } else { $data = file ( '$filename' );  echo("*** hello!! ***<br>"); echo("*** $filename ***"); } } else { ?> <p>&nbsp;</p> <p>&nbsp;</p> <center> <form name= "form1" form method="post"action="<?=$_SERVER['PHP_SELF']?>?page=1"enctype="multipart/form-data?page=1"> <p> <input type="file" name="filename"> </p> <p>&nbsp;</p> <p> <input name="Submit" type="submit" id="Submit" value="Grade" onkeypress="Check()"> //<input type="hidden" id="formaction" value="uploadNow"> <input name="reset" type="reset" id="reset" value="Clear"> </p> </form> </center> <? } ?> and the output is here: Warning: file($filename) [function.file]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\grade.php on line 20 *** hello!! *** *** C:\\\\Documents and Settings\\\\user\\\\Desktop\\\\hardware.txt *** i need to open a file and the location so shown with many slashes (\\\\). why this happen and how to solve this. if u have any other coding that does solve this problem. plz let me know. and since i'm a beginner, plz give full instruction on wat to do, cause i might don't know. advance thanx for ur help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.