How do I set the mime type in zend framework?
I would like to set the repsonse mime type to application/xhtml+xml How and where do I set that in Zend Framework? Thanks for your help. ...
I would like to set the repsonse mime type to application/xhtml+xml How and where do I set that in Zend Framework? Thanks for your help. ...
Hi, Currently i am working on div based remote page calling method means i have to call another file in my div actually i have 1 buttons as button when i clicked on that it has url for replacing currently opened page by another . I am working on cakephp and in localhost i have simple iframe.html in htdocs and song folder(in cakephp) ...
i have a problem in ie8, my site is http://www.2sinfotech.com/demo/guitar// when i click on join now or other link like faq. i didn't get vertical scrollbar in my site. some time i get scroll or some time not. ...
Hi, To begin: i'm not an expert in Zend Framework and doing something terrible wrong. I'm sure of that. I think there's something wrong with my design patterns. As an example: I'm building access management with Zend_ACL (Access Control List) There are three tables in the database: roles resources permissions the permissions table ha...
I have the following html: <html> <body> bla bla bla bla <div id="myDiv"> more text <div id="anotherDiv"> And even more text </div> </div> bla bla bla </body> </html> I want to remove everything starting from <div id="anotherDiv"> until its closing <div>. How do I do that? ...
I use php jpgraph library, but there i a small problem with charsets. lets assume graph.php generates the image, and i call it from some.php some.php ... <meta http-equiv="content-type" content="text/html; charset=utf-8" /> ... <img src="graph.php" /> ... as you see, i set charsets in some.php, but it doesn't s...
<?php $handle = fopen("https://graph.facebook.com/[email protected]&type=user&access_token=2227472222|2.mLWDqcUsekDYK_FQQXYnHw__.3600.1279803900-100001310000000|YxS1eGhjx2rpNYzzzzzzzLrfb5hMc.", "rb"); $json = stream_get_contents($handle); fclose($handle); echo $json; $obj = json_decode($json); print $obj->{'id'}; ?...
I use $_SERVER['QUERY_STRING'] to get the query sting. A example would be a=123&b=456&c=789 How could I remove the b value from the query string to obtain a=123&c=789 where b can be any value of any length and is alpha numeric. Any ideas appreciated, thanks. ...
i want to check if one array is contained in the second array , but the same key and the same values, (not need to be equal, only check that all the key and value in one array is in the second) the simple thing that i do until now is : function checkSameValues($a, $b){ foreach($a as $k1 => $v1){ ...
This is encoded: \u00d6 This is decoded: Ö What function I have to use to decode that string into something readable? \u00d6asdf -> Öasdf ...
Hi, I have the following code: $sql_latest = "SELECT * FROM tbl_latest ORDER BY id DESC LIMIT 0,3 "; $results_latest = $mysqli->query($sql_latest); while($row = $results_latest->fetch_object()) { echo $row->id; } How can I get the results into a array so I can do something like echo $row[1]; echo $row[2]; echo $row[2]; ...
I'm trying to make errors hidden but it seems I'm doing something wrong. In my hosting configuration display_errors is set to off and I don't have .htaccess file. I tried to write follownng script <?php echo ord(ini_get("display_errors")) . " "; die("error"); ?> And I'm getting followng output: 0 error So, display_errors is...
Hi, I have the following PHP code for writing to a filepointer $fp that was opened using fsockopen: syslog(LOG_INFO, "Write " . strlen($buf) . " bytes to socket:"); $bytes = 0; while ($bytes < strlen($buf) && ($w = @fwrite($fp, substr($buf, $bytes)))) { syslog(LOG_INFO, " - " . $w . " bytes written to socket"); $bytes += $w; }...
Hi guys, I am inserting data into a mySQL database, but I am inserting banking details so it is very sensitive, how can I secure it and protect against it getting into the wrong hands? At the moment the code is still very basic, without any preventative measures in place, mysql_connect("localhost", "user", "pass") or die(mysql_error())...
Hi guys, I need to run Shell_exec to import a dump into my MYSQL database. Today I do this: $shellExec = 'C:\wamp\bin\mysql\mysql5.1.36\bin\mysql -h localhost -u root mertero_decicare < D:\localhost\sql\decisions.sql'; $out = shell_exec($shellExec .' 2> output'); Which works. But is there a way to 'find' the location of the mysql ex...
I have a site which targets several industries. So in one industry the manager would be called "department head" and in the other "inspector". Can I solve this issue with gettext, as it is in a way a multi linguistic problem. ...
Hi all, A newbie question: Let's say I have a string like this: $string = "hello---world"; How would I go about replacing the --- with a single hyphen? The string could easily look like this instead: $string = "hello--world----what-up"; The desired result should be: $string = "hello-world-what-up"; ...
I have integrated WHMCS and Drupal. However, when you go to Drupal and you print_r the SESSION, you see completely different information than what you would do if you go to the WHMCS pages. So, my question is, how do I access the one's session, from the other one? I need to access it, in order to see if the user is logged in or not. ...
I'm trying to do some really basic AJAX using PHP & jQuery, but for some reason when I enter text into the input field and click the button I'm always getting null data back. What am I doing wrong? WebService.php: <?php $return['ReturnString'] = $_POST['SearchString']; for ($i = 1; $i < 100; $i++) { $return['ReturnS...
Hey. Please consider the code below. class A { public function __construct() { } } class B extends A { public $a = "a"; public $b = "b"; public $c = "c"; } How do I get the class B's public variables from within the parent class without knowing precisely what they are? ...