Jump to content

CoreyR

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

CoreyR's Achievements

Member

Member (2/5)

0

Reputation

  1. What am I doing wrong here? $filename = "/htdocs/www/vmware/$username/index.php"; $fh = fopen($filename, 'r+') or die("can't open file"); foreach ($filename as $line) { str_replace("&", "&", $line); } $htmldata = $line_num; fwrite($fh, $htmldata); fclose($fh);
  2. I have a text file which contains "&" and I'm trying to figure out how to replace the string with & and re-write the file. Any ideas or resources you know of would be appreciated. Corey R.
  3. unlink($variable); should work
  4. Perfect, thank you. I tried that earlier but I believe I had a syntax error which wasn't allowing me to create the table with or without using the variable. Thanks for the help guys! Corey R.
  5. Ya, I've been there. That only shows how to create a database and a table, but not using a variable. Thanks
  6. I'm trying to create tables from username, is this possible? I would think it was, but I know I have the syntax wrong. Thanks for helping. $query = 'CREATE TABLE "$username"( '. 'cid INT NOT NULL AUTO_INCREMENT, '. 'cname VARCHAR(20) NOT NULL, '. 'cemail VARCHAR(50) NOT NULL, '. 'csubject VARCHAR(30) NOT NULL, '. 'cmessage TEXT NOT NULL, '. 'PRIMARY KEY(cid))';
  7. I was classing the class in all four files. After I revisited the php, I fixed it by adding this to my trigger. Thanks for taking a look, I appreciate it. <?php include ('call_class.php'); ?>
  8. So I have four PHP files that call a fifth file which contains the following: class xml_story {var $title, $description, $propertyname;} When I run php-e trigger.php the trigger file calls four different php files which all use the code above as a resource. PLEASE HELP! Corey R.
  9. Hi all, I have a file which is located in "/usr/home/coreyr/html_files" and I want to copy it to "/usr/home/public/html" I've tried the following and I receive errors. <?php copy('sf.html', '/usr/home/public/html'); ?> any ideas? thanks
  10. Hi all! I have a script that grabs a file, reads it and then creates the file on my server. It works on one server but errors on the other. <?php $sf = "http://developer.newcondosonline.com/rss-properties-san-francisco.xml"; $sfxml = "sf.xml"; $source = $sf; $dest = $sfxml; if (!copy($source, $dest)) {print ("failed to copy $dest. It is possible the XML feed has been changed, please check with provider.<br>\n");} ?> Any ideas? Thanks
  11. Thank you very much!
  12. First off, I understand this has little to do with PHP. This is the only active forum where bright people talk about code so I know some one here can help me. I need to verify if this XML is valid or not. I have searched and search for an active XML forum and I can not find one. <BroucherURL>http://developer.newcondosonline.com/request_brochure.php?property=86&pname=Waterfront Square Condominiums & Spa&compid=35</BroucherURL> <FullDescription><CDATA><DIV><STRONG><EM>Waterfront Square</EM></STRONG> is becoming an integral element</DIV></CDATA></FullDescription> Thank You, Corey Romero
  13. I am reading in a file. Here is one of the tags from the XML. <PropertyURL>http://developer.newcondosonline.com/direct1.php?property=1568&amp;pname=The Potrero&amp;compid=626</PropertyURL> When I grab the URL all I get is "compid=626" because the & breaks the data. Anyone know how to bring this in without breaking this? Or, possibly replace the characters when I down load the file? $sf = "http://developer.newcondosonline.com/rss-properties-san-francisco.xml"; $sfxml = "sf.xml"; $source = $sf; $dest = $sfxml; if (!copy($source, $dest)) {print ("failed to copy $dest. It is possible the XML feed has been changed, please check with provider.<br>\n");}
  14. Ok, here we go..... The following gives me an error of "XSLT processing error: unknown encoding '' <?php // Create an XSLT processor $xsltproc = xslt_create(); // Perform the transformation $html = xslt_process($xsltproc, 'http://developer.newcondosonline.com/rss-properties-los-angeles.xml', 'http://coreyr.modwest.com/test/test.xsl'); // Detect errors if (!$html) die('XSLT processing error: '.xslt_error($xsltproc)); // Destroy the XSLT processor xslt_free($xsltproc); // Output the resulting HTML echo $html; ?> If I download the XML file and upload it to my server and use the following code it works. (applying no changes to the XML) <?php // Create an XSLT processor $xsltproc = xslt_create(); // Perform the transformation $html = xslt_process($xsltproc, 'test2.xml', 'test.xsl'); // Detect errors if (!$html) die('XSLT processing error: '.xslt_error($xsltproc)); // Destroy the XSLT processor xslt_free($xsltproc); // Output the resulting HTML echo $html; ?>
  15. Anyone know of a hosting company that supports PHP5 and allows XSLT to be used? Thank You Corey R.
×
×
  • 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.