Jump to content

dakke

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Everything posted by dakke

  1. Ok, I indeed don't understand that one. Regardless, a MAMP is a local server, and it can execute PHP code. Which is what I understood that the previous user said was wrong. So where am I minsunderstanding this one?
  2. If that is the case, then one would not be able to run a drupal (php/mysql) site locally! If the MAMP/LAMP/WAMP is NOT a local server, then it would not be able to run any PHP/MySQL site. Which it does. A MAMP is indeed a local server, so it should execute a PHP. I'm not talking about the browser executing PHP, I'm wondering where the code is incorrect. This is not a server-not-executing problem, but an issue concerning the code. Just don't know where.
  3. Agreed, but when loaded on a MAMP install, that should work right? If you execute a PHP script on a local server install then that should be executed, or am I not understanding it correctly? If the file 'test.php' does print, then why doesn't it when included in the html?
  4. This is most likely a noob question, but... why does it not work? <html> <head> </head> <body style="background-color:#fff;margin:0"> <div style="border-top:1px solid #404040"> 1. JS: source file <br /> <script type="text/javascript" src="test2.js"/> </script> <br />----<br /> 2. PHP: source file<br /> <script language="php" src="test.php"/> </script> <br />----<br /> 3. JS: script inside<br /> <script type="text/javascript"> document.write('<b></br></br>Hello World</br></b>'); </script> <br />----<br /> 4. PHP: script inside <br /> <script language="php"> echo("Hello World"); print "hello world"; </script> <br />----<br /> </div></div></body></html> with the test.php file in same dir (using MAMP), the test.php does work when loading the file directly: <?php echo("Hello World"); ?>
  5. I have a sql file locally, which I try to import in my db. I pasted it into a txt file, though I assume that I can use the sql file as well... I try to do the following: $file = file_get_contents("includes/database.txt") or exit ("Unable to get content file!"); $query = preg_split("/;/", $file) or exit ("Unable to split content file!"); foreach($connection as $query) { $sql = $query; $execute = mysql_query($sql, $connection) or exit ("Unable to execute file!"); } However, nothing happens. Can someone enlighten me, who is extremely limited in php and just starting to learn it all.
  6. Thanks for the reply. But what about when another framework becomes the next best thing? And doesn't using a framework also requires others to know the framework and as such is selective towards other developers? Using Zend filters out those non-Zend people, would it not?
  7. This question is mainly to get advice from those who have experience using a framework. Any thoughts are more than welcome. We are a small dev team, and wonder whether we need a PHP framework in the first place? Lots of things to be found on the net, and quite a few opinions on it. Not that I'm after a say detailed analysis of our needs and the usefulness of a framework for our particular case. More of a general opinion on what you could say are 'standards' in the industry. So in short: we're an experimental dev team working on a open source project. It's experimental in the sense that's it's going to take quite a while before we get a good output. It's the beginning of a scientific tool, where a proof of concept is the initial step. Proof of concept is more important than a full featured tool. Once the proof of concept is achieved, we will extend the tool further. It will have more features, become increasingly complex. The 'final' version will be, beyond any doubt, very complex. This also means that once the proof of concept is achieved and we've developed some useful addons, we will be looking at integrating this with other experimental workbenches. Meaning: after a initial proof of concept, some addons, integration is the next step. And this is where my question comes in: What is the best strategy given the above (very general) roadmap: "Would you recommend a framework for this sort of project or not?". We currently do not use any of them, so a yes would mean rewriting them using cakephp or zend or Symfony... What is most likely to happen (I guess): Once we have the proof of concept and added some nice features, the integration with others will most likely mean to rewrite the code anyhow. So whether you use your sort of idiosyncratic method initially does not really matter. Cause being experimental probably means you're making errors in the first place. And wouldn't an integration essentially mean to redo the work loaded with the experience of the past few months? Or rewriting the questions: 1. Does a proof of concept require (is better off with) a framework or not? 2. Do addons require a framework? 3. Does an integration require a framework?
  8. Can someone delete this message? It was an error in the php file. A double select conflicted.
  9. I'm new to PHP, HTML, MySQL,... but I thought that this would be rather simple. I want a drop down box, using values from a mysql field. It works just fine, the php that is, but when I integrate it with a form, nothing happens. This is the code: <select name="category"> <?php include('php/DropdownCategory.php'); ?> </select> The actual php file works, I created a drop down. But when added to the form (this section is part of a bigger form, so the <form> tags are in place) it creates 2 drop downs. One completely empty, the other the actual php drop down. So it seems that the select does not use the php drop down, but creates an additional one. What am I doing wrong?
×
×
  • 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.