Jump to content

treybason

Members
  • Posts

    12
  • Joined

  • Last visited

About treybason

  • Birthday 02/11/1975

Previous Fields

  • Languages
    ASP, SQL, PHP, CSS, HTML, XML, XSL

Contact Methods

  • Website URL
    http://www.pixful.com/
  • ICQ
    0

Profile Information

  • Location
    Raleigh, NC
  • Interests
    Playing golf, Running, Investing, Web development

treybason's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I need to upload a self extracting exe file to a linux server and then extract its contents on the server. Does anyone know how to do this? I cannot find any examples of such a thing.I found this link, but it is for zip files.http://w3schools.invisionzone.com/index.ph...&hl=extractIf the exe file runs on windows, can it even run and be self extracting on a linux machine?
  2. treybason

    AAAhhhhhh

    Here is some sample code I got from PHP.net (I think) that will validate numbers. It is looking for any characters other than 0 - 9. I am not sure what happens with real numbers, I have not tried a decimal place. Give it a try. Hopefully it is a good start. if(preg_match("/[^0-9\ ]+$/", $my_var)){// this is not a number, so do something}
  3. treybason

    Simple PHP Call

    Make sure your xml is well-formed. You can do this by opening the file in IE. It should give you an error message if the xml is not well-formed.Here is some xml I have used with SimpleXML before: <?xml version="1.0" encoding="utf-8"?><Screen> <UserName /> <BillID /> <Comment /> <Errors /></Screen>
  4. treybason

    Simple PHP Call

    If you are using PHP 5, you could do something like: $xml = new DomDocument;$xml->load($xml_file);$xml_obj = simplexml_import_dom($xml);print($xml_obj->INFOBLOG->SITE->NAME);unset($xml, $xml_obj); This will print "Kovo's Webspace" to the page. Using the SimpleXML object it makes it easy to traverse the nodes of the xml doc.If you want to loop through the <SITE> nodes, try something like: foreach ($xml_obj->INFOBLOG->children() as $child){ if($child->getName() == "SITE") print($child->NAME);}
  5. treybason

    Simple PHP Call

    What version of PHP are you using?Also, I do not see a <INFORMATION> node in your xml, so I am not sure which nodes you want to pull out. Did you mean all <SITE> nodes in the <SITES> node?
  6. aspnetguy,Thanks for the response. I tried a search of the forums and I could not find anything. I have also looked at tutorials here and at php.net, but I cannot find anything concrete on whether I need to clean up my objects or not. I am just looking for some opinions here.On php.net when I see them create instances of objects in their sample code they do not use unset() to clean up instances.Thanks!
  7. Does anyone have any opinions on the best way to clean up memory in PHP? I have some classes in the code of my website and my pages create instances of those classes like $obj = new CObject(); The way I destroy these objects is below. unset($obj); In the PHP sample code I have seen sometimes object instances are not destroyed, sometimes they are. Do I need to clean these up? Is this done automatically by PHP? Should I set my objects to null also like $obj = NULL;
  8. Access will give some strange problems like this that are completely unexplainable when using access as backend for a website. I had a website once using access as a backend. I had a user table (tbl_User) with a column named "Password". One day my insert statements into this table that were trying to insert the "Password" data started failing. I had to change this field name to "Passwd" for it to work again. Those insert statements were working using "Password" for a while, but one day Access decided it did not like that field name.Strange...
  9. Please don't use access to develop a website. I did this a long time ago and after a certain amount of data was in the db, very strange things started to happen. I then had to go through trouble of migrating to ms sql. Like ScottR said you can get a free dev copy of ms sql or you can use my sql for free also.
  10. Did you re-boot to make sure the changes to php.ini were read by the php engine? There may be another way to get changes to the php.ini file to be picked up by php, but I only know of re-booting to do so.
  11. You also left the closing single quote off of the end of line 66 and the semicolon.You have$message = '<table width="388" border="0" align="center" cellpadding="0" cellspacing="0" class="BodyPagraph"> It should be $message = '<table width="388" border="0" align="center" cellpadding="0" cellspacing="0" class="BodyPagraph">';
×
×
  • Create New...