Jump to content

phpnewbie007

New Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About phpnewbie007

  • Rank
    Newbie
  1. I run with your test php file and it only displayed the user in browser (ie, Current script owner: 'myusername'). But not generated image in the folder. But when I run the same file from terminal, it generated image. I have an HTML form and onclcik a button calls the x.php (which in turn expected to generate and save image). I call the file from url as 'http://localhost/phil/main.html'. So is that a problem with permission? Thanks...
  2. I am trying call an R batch file inside php script from browser. The R script basically generate an imgae and save in a folder. Unfortunately, I could call the R within php (means that no image is saved in the folder) using BROWSER. But when I run the php script from the commadline, it works and image is saved in the folder. <?php exec("Rscript /var/www/html/phil/figs/map.R"); ?> Execuition of following R batch code and php codes work and save image in the specified folder from the terminal. 58A-UD3R:~$ php /var/www/html/phil/x.php 58A-UD3R:~$ Rscript /var/www/html/phil/figs/map.R I totally in confusion why browser cannot successfully save image. Or is there anythinng need to be change in server for generating image? Anyone please help me for solving this probelm. Thank You..
  3. phpnewbie007

    MYSQL QUERY CANNOT RECOGNIZE THE ID IN VARIABLE FORM

    Yes, I modified the code based on your suggestion. Thank you very much Ch0cu3r
  4. phpnewbie007

    MYSQL QUERY CANNOT RECOGNIZE THE ID IN VARIABLE FORM

    I solved it by using trim(). There was whitesapce in $id. Thankss....
  5. Hi Members, I am search for the reason for the problem why my mysql query cannot fetch data and store in file based on id in $variable form. For example, $sql="SELECT * FROM mytable WHERE mine_id='1234'"; works for me. But when i use $sql="SELECT * FROM mytable WHERE mine_id='$id'";, files are created as empty. I chanaged the quotes and could not store the data in file. So anyone please help me. For more clear, i attach the part of my code for ($i=0;$i<=10;$i++) { $id=$seqs[$i]; $dbo = new PDO($dbc, $user, $pass); echo $sql = "SELECT * FROM mine_id WHERE locus_id='$id'"; $qry = $dbo->prepare($sql); $qry->execute(); $data = fopen('file.csv', 'w'); while ($row = $qry->fetch(PDO::FETCH_ASSOC)) { fputcsv($data, $row); } }
×

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.