User Profile
Collapse
-
I did manage to solve the problem, actually the file did not exist, because I was using int to store to database when I retrieve it, 0823369 will be 823369, but when I store something for the name I use string so the file on the disk is 0823369, file name from the database was 823369, yeah I'm stupid. -
Im a bit confused with your script, but what I would have done is when i create select html element, I will add onchange='jsFun ction()' and that will call my javascript function when user selects something from a dropdown list, from javascript I will use ajax request to my php script pass in the get or post values and get data back, use jquery to populate the select dropdown, Here is silimar script that i use
...Code:<select onchange="loadAssignments()"
Leave a comment:
-
Read a file in a subdirectory
I'm trying to read a file which I created in another php script, the file exists on that path, I checked the parameters $assId and $matric they are correct, and the file is not empty it has simple sentence in it, i tried fread as well but im getting empty string as result.Code:$fileContent = file_get_contents('upload/'.$assId.'/'.$matric.'.cpp'); file_put_contents('filename.txt',$fileContent);
I'm using windows...Last edited by Stewart Ross; Dec 9 '12, 07:24 PM. Reason: removed filename which broke site rules - please do not post code with 'jokey' swear words such as 'fuckme.txt' as file names
No activity results to display
Show More
Leave a comment: