User Profile

Collapse

Profile Sidebar

Collapse
lka527
lka527
Last Activity: Jul 14 '10, 05:40 PM
Joined: Apr 5 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • actually I understood that part I just did not know how to implement that...
    I meant, I plugged this recommended code into the page where the replier mentioned me to do but that was messing me up with other codes.....
    See more | Go to post

    Leave a comment:


  • How to upload file and submit button to other page (PHP)

    I am trying to make a site available for someone to *upload* certain type of text file (.txt) that can be parsed by written code. the upload file is available on the main site but I need this to result in different page on the right as someone clicks on SUBMIT with one's file attached. The uploaded file by clicking submit button should be PARSED on the right side of the page but when I click on the submit with the file now, it goes to the local host...
    See more | Go to post

  • lka527
    started a topic How to update page after a file is uploaded?
    in PHP

    How to update page after a file is uploaded?

    I am trying to make a site available for someone to *upload* certain type of text file (.txt) that can be parsed by written code. the upload file is available on the main site but I need this to result in different page on the right as someone clicks on SUBMIT with one's file attached. The uploaded file by clicking submit button should be PARSED on the right side of the page but when I click on the submit with the file now, it goes to the local host...
    See more | Go to post

  • lka527
    replied to Urgent Question!! on PHP!! It's simple!
    in PHP
    it's uploading file and displaying the file I just uploaded..!!...
    See more | Go to post

    Leave a comment:


  • lka527
    started a topic Urgent Question!! on PHP!! It's simple!
    in PHP

    Urgent Question!! on PHP!! It's simple!

    Hi all,
    I have a question about the code.
    I am working on this code to let others to upload their text files in the same format. (having category name and display the answer after : (colon)..
    So, I am trying to let people to be able to upload their text file and go through the code that filters (parses) out the contents I want (what I want is showing the contents after the colon..) Can anyone please help me out?

    ...
    See more | Go to post

  • lka527
    started a topic question on the php code please!!
    in PHP

    question on the php code please!!

    Hi all,
    I have a question about the code.
    I am working on this code to let others to upload their text files in the same format. (having category name and display the answer after : (colon)..
    So, I am trying to let people to be able to upload their text file and go through the code that filters (parses) out the contents I want (what I want is showing the contents after the colon..) Can anyone please help me out?
    Code:
    
    
    ...
    See more | Go to post

  • lka527
    replied to Parsing text file with PHP
    in PHP
    oh!!!!!! it works now!
    Thank you so much!!!!!!!!!!! !!!!!!!!!!!!!!

    I will post more questions as I have .
    I appreciate your help so much!!!!!!!!!!! !!!

    You are my hero:)
    See more | Go to post

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    http://www.personal.psu.edu/kvl5046/test1.jpg

    is the actual result screen shot I just took.....
    See more | Go to post

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    http://personal.psu.edu/kvl5046/Other.txt

    is the text file I am supposed to parse..



    Code:
    <?php
     
        $file = fopen("C:\wamp\www\Other.txt", 
    
    "r") or exit
     
    ("Unable to open file!");
     
    while(!feof($file))
    {
     
        $line = fgets($file); // Read a line.
    
     
         //escape if the line
    ...
    See more | Go to post
    Last edited by Atli; Apr 5 '10, 06:24 AM. Reason: Added [code] tags.

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    Notice: Undefined offset: 1 in C:\wamp\www\tes t.php on line 18
    the key: High-Resolution CT Scans - the value:
    Notice: Undefined offset: 1 in C:\wamp\www\tes t.php on line 18
    the key: Center for Quantitative Imaging - the value:
    Notice: Undefined offset: 1 in C:\wamp\www\tes t.php on line 18
    the key: Penn State University - the value: the key: Machine - the value: PSU_225kV_30cmT T_RmtRecon_30UG 6003 the key: Plan - the...
    See more | Go to post

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    I asked another question below.. Please review this and answer for me :(
    Thank you so much
    See more | Go to post

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    Thank you so much for your effort..
    I am almost there, I think!

    "Remember, your original code already fetches each line. All you need to do is store the line returned by the fgets() function and apply the above method to it."

    You said this in the last part of your answer..
    how can I store the line returned by the fgets() function?...
    .. I just have no idea...T_T

    This is what...
    See more | Go to post
    Last edited by Atli; Apr 5 '10, 06:23 AM. Reason: Added [code] tags.

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    Sir....
    I am sorry that i keep asking you..
    but in order to print every value how can I write this?
    This is desperate for me:(
    I tried to do this in array too but so confusing me..
    Please let me know how to fix this into the better way.
    See more | Go to post

    Leave a comment:


  • lka527
    replied to Parsing text file with PHP
    in PHP
    After I added

    echo fgets($file). "<br />";

    at the end of the php code I only got partial result in the page.
    I got this below
    Plan: TIM_BONE_NEW
    Scan Type: AxialCT
    I don't know why I am getting only partial data and I don't understand '2' in the php code you have given.. I am not really good at php and I really appreciate your help :)



    ...
    See more | Go to post
    Last edited by Atli; Apr 5 '10, 05:33 AM. Reason: Please use [code] tags!

    Leave a comment:


  • lka527
    started a topic Parsing text file with PHP
    in PHP

    Parsing text file with PHP

    In the code, I have bold text where I have a question.
    I am not sure how to parse the file into different fields (right below with bold: machine,plan,st udy,scantype, date)... and I have more different files in the same format of this below.

    Others also have machine,plan, study, scan type, date as their information.
    right side of colon (:) have to be parsed separately..

    Machine: 225kV_30cmTT_Rm tRecon_30UG6003...
    See more | Go to post
No activity results to display
Show More
Working...