|
Whenever i try to integrate Php with Apache using genuine pattern of copying php.ini-development file
changing path i encounter a problem ie when i restart my apache server it pops a error message and does not start again .Please someone help me with this problem.
|
|
|
|
|
I shoul you to use XAMPP ... it's very usefull for your purpose !
Check it here
www.malorgio.it
|
|
|
|
|
Hi,
I m totally new for PHP.
I downloaded one data grid example from sigmawidgets.com mostly pages are running well but some pages have PHP code which is not running, because I have not installed the PHP on that server.
I have Apache Tomcat (5.28...) web server on 64bit Windows 2000 server.
Can some help me how to install PHP and how it works.
Thanks in advance.
|
|
|
|
|
You may wish to try XAMPP.
It's available in an installer package that will setup the whole suite - php, mysql, apache etc.
It comes with a number of examples of php code.
|
|
|
|
|
You can also check the EasyPHP suite which is more or less the same than XAMPP.
Good luck
|
|
|
|
|
I have a string variable $xml which contains this string:
<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:sumo="http://www.ontologyportal.org/translations/SUMO.owl.txt#" xmlns:dul="http://www.loa-cnr.it/ontologies/DUL.owl" xmlns:owl="http://www.w3.org/2002/07/owl" xmlns:top="http://talkingowlproject.com/schemas/top-level-concepts-10/" xmlns:wps="http://talkingowlproject.com/schemas/wordnet-parser-schema-10/"><rdf:Description rdf:id="#me">
<rdfs:label>Pigwidgeon</rdfs:label>
<rdf:type rdf:resource="http://talkingowlproject.com/schemas/top-level-concepts-10/TalkingOwl" />
</rdf:Description>
<rdf:Description rdf:id="#you">
<rdfs:label>greg</rdfs:label>
<rdf:type rdf:resource="http://talkingowlproject.com/schemas/top-level-concepts-10/User" />
</rdf:Description></rdf:rdf>
I have the following code:
$xmlobj = simplexml_load_string($xml);
if ($xmlobj===false) die('bad news');
print_r($xmlobj);
The result displayed is (appears to be?) an empty structure:
SimpleXMLElement Object
(
)
And when I try to iterate over members of the object, it performs no iterations (confirming that the structure is empty).
Is there something wrong with the XML string? Is there a problem because of the namespace declarations or the use of namespaces on every tag? When I remove the namespace declarations in the root tag, I actually get a structure with contents .... but then it doesn't know the namespaces, so it can't use them when I'm parsing the object. (I need to be able to identify namespaces with nodes.)
Thank you for your help.
--Greg
|
|
|
|
|
I finally found out what was wrong, and came up with a solution!
I hope it isn't considered "bad form" to link to a blog post, but I wrote a long and involved blog explaining my frustration and what I found out the problem to be here:
http://talkingowlproject.blogspot.com/2011/06/simplexml-and-namespace-quirks.html[^]
And I actually wrote my own class, SimpleRDFElement , to extend the SimpleXMLElement class and solve the problems. You can read my description of my extension class and download the 1-page source code here:
http://talkingowlproject.blogspot.com/2011/06/simplerdfelement-class-extension-of.html[^]
In a nut shell: the built in functions with SimpleXML handle namespaces poorly, the children() and attributes() methods only allow you to select children and attributes in a particular namespace (not all at once), and there are no functions specifically for extracting the namespace portion of the tag of the current top-level element.
So, my extension class, SimpleRDFElement, provides functions to solve all of these problems, as well as a method for parsing an RDF XML string into triples.
I hope that this helps anyone else who is interested in this question!
|
|
|
|
|
Good one! Would you consider massaging your writeup into a tip/trick or article for CP? It's exactly the right kind of stuff.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Thanks for the suggestion! I've done it, and the article is now posted. Cheers!
--Greg
|
|
|
|
|
Hi,
I need to know what's wrong in this code that can't show any data using CURL -
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://search.msn.com/results.aspx?q=test&FORM=MSNH");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data1=curl_exec($ch);
echo "<font color=black face=verdana size=3>".$data1."</font>";
echo curl_error($ch);
curl_close($ch);
?>
Nothing is showing ..
N.B.: My Curl is enabled.
modified on Monday, June 27, 2011 11:23 PM
|
|
|
|
|
Hi!
I'd like to know if there's a way I can call a javascript variable in a php function?
Like for example, the code below would get the value of textbox text1 when the button is clicked. It should call the javascript function with a parameter. That javascript function calls the PHP function with a javascript variable nVal.
<?php
Function ShowNumber($nValue) {
$nTotal = $nValue + 1;
Return $nTotal;
}
?>
<script language="javascript">
Fuction PassNumber(nVal) {
alert("<?php ShowNumber("+nVal+"); ?>");
}
</script>
<input type="text" name="text1" value="200" /><br />
<input type="button" value="Go" onClick="PassNumber(this.text1.value)" />
Thanks.
|
|
|
|
|
No. If you really want to get a value into Javascript from PHP without reloading the page, the way to do it is using AJAX.
|
|
|
|
|
You have to think about it this way:
PHP code works with what the server "knows".
Javascript code works with what the browser / client "knows".
To get them to interact, you need to explicitly "pass" information back and forth between the two.
For example, if you have a variable in the javascript, you can "pass" the value to the server by passing it with a GET variable, e.g.
<script language="javascript">
Fuction PassNumber(nVal) {
location.href = 'mypage.php?n='+nVal;
}
</script>
Then, on the server side, you receive the GET variable to produce the effect that you want:
<?php
$nval = $_GET['n'];
if ($nval)
{
print('<script>alert('.$nval.');</script>');
}
?>
Contrariwise, when you have the PHP variable on the server side, you can use that to feed it to the Javascript function when rendering your onclick function:
<input type="text" name="text1" value="200" /><br />
<input type="button" value="Go" onClick="PassNumber(this.text1.value+<?php print($nval) ?>)" />
This requires a re-load of the page, and change of URL, each time you click the button. To do it more "subtley", without a reload, you would have to use AJAX: but the principle would be the same. Pass the information between Server and Browser using calls to the PHP page with GET.
--Greg
|
|
|
|
|
Hi all,
This is about Drupal (may be related with configurations)
I've configured Drupal correctly, and after the all configurations I'm on my new site now. I can see so many link on the page such as Dashboard and so on.
But when I click on any of the link on my site, all of them redirect to the folder/file list on the browser. How can I fix that?
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Step 1: Take a browser to the Drupal users forum at drupal.org[^]
Step 2: Look at the extensive documentation there, particularly in the "Forums and groups" section.
Step 3, if you are still stuck: Sign up and post a message to the Drupal support forum explaining your problem. They are a helpful bunch. (I have to say that, I'm one of them. )
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I have already check with the documentation but couldn't find a proper solution.
So I have post my question over here, and just on drupal forum as well.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Did anyone of you comes with this issue?
So far no luck. I am searching the web since yesterday.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Hi there,
I'm writing a small(ish) Python app that is designed to play a list of sounds. Ever seen QLab? A bit like that.
The problem I have is this: I have a threading.Timer that (at the moment) prints to the console that a sound has finished playing - it will change the UI, eventually, but the printout is all I need for now - but the timer does not wait until the interval is complete before it fires the function.
Code:
playout_1_timer = threading.Timer(10.0,musicDone)
playout_1_timer.start()
def musicDone():
print "Music finished playing"
However, the timer does not wait the 10 seconds as it should, and calls musicDone as soon as .start() is called.
What's going on?
Thanks,
icemclean
|
|
|
|
|
try this:
import threading
def musicDone():
print("Music finished playing")
playout_1_timer = threading.Timer(10.0, musicDone)
playout_1_timer.start()
David
|
|
|
|
|
Hello
I'm new in here. I have concept to make project. but i don't know what i need for this project.
It will be mobile balance recharge system. It will be in two part.
1st: web site part.(client will go there ,they login and put number and amount to recharge.)
2nd recharge server part.(Rechage Data will sync from website,and automatically recharge sync number by USB Modem. it will reply back to server recharge status.
from website each user will be balance. from there they can send money to another mobile.
Like that project what i need to know and how i can devolop the software and php web site.
Here is an example what will be the system www.autoflexiserver.com { they use 6 modem for 6 mobile oparator and 1 modem for internet.
Anybody can help me plz
Looking for php code.
|
|
|
|
|
rabbyweb wrote: Looking for php code
People wont give you code here. If you want one, try researching them using Google, and if you're stuck on an issue on the code, then you might want to post the code here. People will be much happier to help if you also help yourself.
Good judgment comes from experience, and experience comes from bad judgment. Barry LePatner
|
|
|
|
|
hello guys
i work my final project using php mysql
that program is find sorted path from store to other store (each store have coordinat in map),then the program list the path in the table in one page after user press submit button, so user can choose the sorted path
my method is simulated annealing,
can some one help me because i'm newbe in php
thank's for replay
|
|
|
|
|
Please I urgently need an online exam or test script in PHP and MYSQL. i haven't been able to find any one yet. thanks
you can reply me via email: eoakinyemi02@gmail.com
|
|
|
|
|
You dont need to post your email here unless you want to invite spams. Im not sure if I understand you correctly but if you are looking for online exams, there are plenty if you just use Google. For test scripts, I'm not sure about your reason why you need them.
Good judgment comes from experience, and experience comes from bad judgment. Barry LePatner
|
|
|
|
|
Hi,
I recommend a site where you can really build your site for free. There you can test your php and mysql script.
This is the site. http://0fees.net
|
|
|
|