Jump to content

syed

Members
  • Posts

    151
  • Joined

  • Last visited

Everything posted by syed

  1. If $page is a dynamic variable it can only be called on an instance of PageStuff. e.g $pageStuff = new PageStuff(); $pageStuff->page = $customVar; In your case, the $page object is being passed to the create_vars() method, which can modify the object but after the method completes, the $page object goes out of scope.
  2. What software does the remote machine have installed? web server? if so , are the mp3 in a web directory?
  3. If you just want to stream the file from your other server you can use the readfile() . header('Content-Type: application/zip'); header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filename=\"file.zip\""); readfile('http://www.yourhost.net/file.zip');
  4. syed

    help with regex

    Thank you for your reply, I should have mentioned that the space in the expression may or may not be present.
  5. Hi guys, hope someone can help, Im having some problems spliting a string using the preg_split function. Basically im trying to split a string similar to this. x > 1 Output needs to be array([0]=>x[1]=>>[2]=>1) I need a regex that can also split on x >= 1 or x <= 1 or x = 1 or x != 1 Currently im using this, $regx = "/(<=|<|=|>|>=)/"; but for expressions like x >= 1 the returned array contains 2 elements one for each operator, I need just the one. Any help will be greately appreciated.
  6. Hi Thorpe, thanks for the article, explained a alot and set me on my way. I had this whole complex spliting and recursive check inmind. It never occured to me, to construct a regex pattern and compare it to the uri. Thanks for the article, you rock.
  7. Hi guys, I am developing an MVC application and need some advice about how to set up url routing. Currently I can map a uri to modules/controllers and actions. I though I might leave the routing to last but it seems like that might have been a bad idea. Initially I though I might implement a Zend style routing approach and I still want to do this, but I am lost for thoughs on how I might go about this, I have looked at the zend router classes and understand the principle but cant seem to implement it in my own mvc. So far I have this, $router is an instance of a router class. mapRoute takes a route name and a route object as parameters. The name will be used for convinience. The second parameter takes a route instance which currently takes two parameters, where param1 is a route pattern and param2 is deafult values for when a uri macthes the route pattern. So if a user types http://example/user/23, the router should map to user controller, profile action. The id, which is 23, will need to be injected into a request object. Finally the router object will be added to a front controller instance, so the front controller object can gain access to all the routes. $router->mapRoute("user", new Route( "user/<id>", array( "controller"=>"user", "action"=>"profile" ) ) ); If any one has any ideas please do share, im not after code, unless you want to supply some, I just need some advice to stream line the whole process or what the best way might be. Any help will be greatly appreciated.
  8. What do you want us to check? or help with
  9. Do a left join in sql, then both tables will be linked even though there is no records in table B, then check the Chk TA Ref Number in table B if a value exists, if it does then you can select the check box.
  10. If you are using apache, you can use the mod rewrite module to create the urls, other wise you will need to use a custom 404
  11. Why do you want to put them in another script? What are you trying to do?
  12. how is the supplier id saved in the table, it appears you have it saved as Supplier ID with a white space, is this correct?
  13. the pictures variable should be an object, print the variable to see whats inside it, if it is still an object even after no nodes being found, then try to invoke the length method or property
  14. Bar Width and Bar Height is one word not 2 BarWidth BarHeaigh in the array. $client = new SoapClient("http://www.barcodesoft.com/bcdgen.asmx?WSDL"); $response = $client->UPCA(array( 'textToEncode'=>'9783540235606', 'ImageFormat'=>'PNG', 'strAddon'=>'', 'Orientation'=>'Original', 'BarWidth'=>'2', 'BarHeight'=>'10' )); print_r($response );
  15. just to add to premiso $dob = $year . "-" . "$month . "-" . $day;
  16. $client = new SoapClient("http://www.barcodesoft.com/bcdgen.asmx?WSDL"); print_r($client->__getFunctions());
  17. You can use curl but you will need the library installed.
  18. Have you checked the db table to make sure the login credentials are correct.
  19. It depends where the values for the meta data will be comming from. If all your data is stored in a database then you could construct your meta tags based on the page you are accessing, again it all depends on where the meta data is comming from. Do you have a db table that might be able to construct the meta data?
  20. Whats is the valye of $content? is it an xml response? it is is just use DOM
  21. Hi JZS, it seems to me you are planning a long term project, which will consists of many users. I would not suggest going with a framework becuase it is quick to develop a website. You need to think about the long term too, what happends if the framework you use no longer exists or is no longer supported in the future.
  22. Does blackerry support full javascript?
  23. It can be a link or a button <a href="regen.php">regen</a> regen.php <?php // ur code here. ?>
  24. Yes it is, you can use the session_regenerate_id() function to change the current session id.
×
×
  • 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.