Jump to content

void

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by void

  1. Well, it's because you overwrite your $sql variable afterwards. Use different variables. Function mysql_query() executes the query, not defining of a variable itself.
  2. Are we talking about a basic string concatenation here? $sql = "INSERT INTO users_shiping (name) VALUES ('{$_POST[fname]} {$_POST[lname]}')";
  3. what code?..
  4. guys? ???
  5. index.php?side=billeder&id=kira
  6. anyone? :/
  7. Well nothing special really. <?php set_time_limit(0); $out = shell_exec("./program.out"); echo nl2br($out); }
  8. Good day I have a php file which executes shell script with shell_exec() command, that runs for about 15 minutes. The problem is, browser keeps "loading" the php file, but after like a minute or two, it stops and says "Done.", even though the shell script continues is job. Everything would be great, except i need php script to do some work after the shell script is done. set_time_limit is set to zero. any thoughts? Thanks.
  9. wouldn't mysql_query("CREATE TABLE IF NOT EXISTS `your table` ( ...."); do the trick?
  10. some basic thinking ... while ($rowi = db_fetch_array($resulti)) { $names .= $rowi['name'] .", "; } echo substr($names,0,-2);
  11. Well, you could use mod rewrite functionality. This requires .htaccess file in your site directory, with the following content (and your custom paths, if the files are not located in root directory): RewriteEngine On RewriteBase / RewriteRule ^(.+)\.jpg$ /image_output.php?file=$1.jpg [L] This should redirect any requests for a jpg image to your image_output.php file. eg. www.site.com/picture01.jpg will be internally redirected to www.site.com/image_output.php?file=picture01.jpg
  12. You have to create image_output.php file with the following content: <?php $image = imagecreatefromjpeg("path/to/image.jpg"); header('Content-type: image/jpeg'); imagejpeg($image); ?> Then, in your HTML file, the image tag should look like this: <img src="image_output.php" />
  13. nohow. you got to have an html page with an <img/> tag, which src attribute should be a php script. otherwise, you can output only an image to your browser.
  14. $message variable must include all the data you got there. e.g. $message = $name."\n".$lastname."\n".$age; .... !jazz showed you the proper use of mail() function.
  15. you need to set the right permissions for the directory, where the pictures are uploaded. most FTP client software (eg. FileZilla, right click on dir/file -> File attributes) have this functionality. also - PHP: chmod("path/to/image/dir", 0777); (this should be done once.)
  16. Your <form> tag is missing parameter enctype="multipart/form-data".
  17. are you sure there's a record with the id you're trying to update? does field `Custnum` have to be capitalized?
  18. structure of the `customers` table would be helpful.
  19. it really should work. maybe you could show us more code you have in there?
  20. if i understood right, try $pattern2 = '/^News$/i';
  21. That might be teh issue are you sure? but the `./program.out` works just fine! where should i search for the error message, if it doesn't execute my file?
  22. yes, i understand, i'm echo'ing it.
  23. thanks for reply. what permission issue could it be? i chmod'ed everything 777, but that didn't help. commands such as `mkdir` work fine. no, sh ./program.out doesn't work. even in ssh, it gives `cannot execute binary file` error. any other ideas?..
  24. Hi there, i've got a problem with shell_exec(). the function itself works just fine, but i can't get it to execute a c++ compiled file. what i'm trying to do is running shell_exec("./program.out"), but it returns no output, not even an error or some kind. the script doesn't do it's job, also. What could possibly be wrong? Thanks in advance.
  25. Yea, so I need a solution for a shared session file. What would you guys suggest? Of course, sessions for completely other applications on the secondary server should not be disturbed. Maybe it's possible to have several session data files?
×
×
  • 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.