Jump to content

ziv

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Everything posted by ziv

  1. y to use round or worse - to use regex for this simple task, if you have the number_format function? <?php $pi = 3.14159265; echo number_format($pi, 2);
  2. wikipedia and facebook using php and it seems to work fine, don't you think so?
  3. you're not wrong - both mimetype and fileinfo are PECL extensions. take a look at the Zend Framework - they have an implementation for mail & mime.
  4. remember that any solution you'll choose - this is a security breach!!!! about your options: 1. you can't do it (you can - but it's not worth it. you need to open pipe, and send the commands threw this pipe and so on...) 2. this is good one, you probably need to write your own wrapper (this is the solution that my company use). 3. that solution is new to me and i gonna check it right now. 4. that option is ok, if your scripts do not need privilege user or specials permissions. another solution, is to write your own daemon (you can write a cli-php daemon) and use this daemon as a server to run applications. build it as a simple server that listen to some rare port, and accept in the requests a path to the script you want to run, list of parameters and password (for security).
  5. I tried to do the same thing, and here are the results: <?xml version="1.0" encoding="UTF-8"?> <root> <x> <y>aaa</y> </x> <x> <y>bbb</y> </x> </root>'; <?php $xml = simplexml_load_file('the file above...'); echo "start: {$xml->x->y}", PHP_EOL; $xml->x->y = 'ccc'; echo "end: {$xml->x->y}", PHP_EOL; echo $xml->asXML(); ?> results: start: aaa end: ccc <?xml version="1.0" encoding="UTF-8"?> <root> <x> <y>ccc</y> </x> <x> <y>bbb</y> </x> </root> it seems to work fine, maybe, if we you'll attach the XML file, i could assist you....
  6. The PECL Mime type extension is deprecated. You can use the file info family functions.
×
×
  • 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.