Search Results

Search found 42698 results on 1708 pages for 'php in array'.

Page 46/1708 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • php 5.3.2 version

    - by Dezigo
    I have downloaded a php 5.3.2. (.zip) from offical website. In directory 'php/ext' ,there are no files php_mssql.dll,php_pgsql.dll,php_curl.dll lybaries. where can i find it? Php 5.3.2 supported it? other libary are ok.(mysql) PHP Warning: PHP Startup: Unable to load dynamic library 'c:/webserver/php/ext\\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'c:/webserver/php/ext\\php_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'c:/webserver/php/ext\\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0 [Thu May 13 16:17:57 2010] [notice] Child 2212: Child process is runningified module could not be found.\r\n in Unknown on line 0

    Read the article

  • PHP - Resize an image and fill gaps of proportions with a color

    - by Kerry
    I am uploading logos to my system, and they need to fix in a 60x60 pixel box. I have all the code to resize it proportionately, and that's not a problem. My 454x292px image becomes 60x38. The thing is, I need the picture to be 60x60, meaning I want to pad the top and bottom with white each (I can fill the rectangle with the color). The theory is I create a white rectangle, 60x60, then I copy the image and resize it to 60x38 and put it in my white rectangle, starting 11px from the top (which adds up to the 22px of total padding that I need. I would post my code but it's decently long, though I can if requested. Does anyone know how to do this or can you point me to code/tutorial that does this?

    Read the article

  • Replacing text node of HTML input in PHP

    - by Aman Kumar Jain
    Hi, I want to replace all the text nodes in a html text. I'll explain with an example: $html = " <div> <p> text2 text2 word text2 <span>abcd</span> text2 text2 word text2 <p> this is a long, very long statement with punctuations. </div> I want to replace "text2 text2 word text2" with "<span>text2 text2 word text2</span>" and "this is a long, very long statement with punctuations." with "<span>this is a long, very long statement with punctuations.</span>" What should be the regular expression for the same?

    Read the article

  • what is file verification system for php project or licence checking the configuration files

    - by Jayapal Chandran
    Hi, My colleague asked me a question like "license check to config file". when i searched i got this http://www.google.com/search?q=file+verification+system&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a and in the result i got this http://integrit.sourceforge.net/texinfo/integrit.html but could not grasp much of its idea. Here is my thoughts... Our project is written in codeigniter. The project owner is providing it to their customer. The owner is a business partner with that concept. Besides, the owner needs control of the project code so that the customer will not break rules with him like changing the code or moving it go another server or validity. So the owner needs a system to enable disable the site. Let me give an example... owner.com will have an admin panel where he can either disable or enable the client.com. when he disables the client.com should display a custom message instead of loading the files. client.com is written i a way that i will process requests from owner.com and also the other way round. so, here i want a list of the concepts with which we can implement the ownership and control over client.com any suggestions, links, references, answers will be helpful. If i am missing something in my question i will update my question according to your comments if any so that the users can give in their idea without confusing of what i had asked. THX

    Read the article

  • Writing in two sessions from the same file (PHP)

    - by bellesebastien
    Hi, I want to make it possible for the administrator to log in as a fontend user from the backend. Right now I'm using two sessions (sessions with different names), one for the admin and one for the frontend. Is it possible to write in the first session, close it and then open a new session? This is a simplified version of what I attempted but failed: session_name('admin_session'); session_start(); // use first session without generatring any output session_close(); session_name('frontend_session'); session_start(); // use the second session Thanks.

    Read the article

  • PHP else/if statements

    - by V Neal
    I've written the following PHP statement but everytime i try to combine it into an else/if, it breaks. Can someone please advise? I'm new to PHP and am getting a tad stuck. Thanks :) <?php if (is_page( 19 ) ) {?> <div class="imageSlider"><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image2.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image3.jpg" alt="" /></div> <?php }?> <?php if (is_page( 23 ) ) {?> <div class="imageSlider"><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /></div> } <?php }?>

    Read the article

  • Changed array composition, mdadm --detail still shows the old array size

    - by Prody
    I have a machine with 8 disks. I installed it with my hoster's install automation (it's OVH, I don't have physical access to it). The machine installed correctly, but it made an array that I wanted to change. It created a raid5 array across 5/8 disks and I've changed it to raid10 across 8 disks. I've done this by first --stopping the old array and then --creating the new array. It warned me that a previous array was there, but I chose to continue. So it created the array, spent 10ish hours syncing it and now that it's ready I get this strange behavior: When I fdisk p on it, I see the correct size. But when I mdadm --detail it I see the old array's size even tho I get the new composition and level. When I try to pvcreate on it, i get the old size again for some reason. Did I have to do something else? Did I miss something?

    Read the article

  • Filtering a PHP array containing dates into a yearly summary

    - by privateace
    I'm looking at a way to create a summary of transactions within a certain month based on the contents of a PHP array. Intended outcome (excusing layout): ------------------------------------------- | December 2009 | 12 | | January 2010 | 02 | | February 2010 | 47 | | March 2010 | 108 | | April 2010 | 499 | ------------------------------------------- Based on my array: Array ( [0] => Array ( [name] => 2009-10-23 [values] => Array ( [0] => INzY2MTI4ZWM4OGRm ) ) [1] => Array ( [name] => 2009-10-26 [values] => Array ( [0] => IYmIzOWNmMmU3OWQz ) ) [2] => Array ( [name] => 2009-11-23 [values] => Array ( [0] => INTg4YzgxYWU1ODkx [1] => IMjhkNDZkY2FjNDhl ) ) [3] => Array ( [name] => 2009-11-24 [values] => Array ( [0] => INTg4YzgxYWU1ODkx [1] => INTg4YzgxYWU1ODkx ) ) [4] => Array ( [name] => 2009-12-01 [values] => Array ( [0] => IMWFiODk5ZjU1OTFk ) ) I've had absolutely no luck no matter what I've tried. Especially with adding months that do not contain any variables.

    Read the article

  • Parse a json(?) string using php

    - by passatgt
    I have a string, more specifically, this one: a:16:{s:9:"pseudonym";O:16:"SimpleXMLElement":0:{}s:14:"parallel_title";O:16:"SimpleXMLElement":0:{}s:9:"title_var";O:16:"SimpleXMLElement":0:{}s:6:"series";O:16:"SimpleXMLElement":0:{}s:9:"vol_title";O:16:"SimpleXMLElement":0:{}s:9:"reference";O:16:"SimpleXMLElement":0:{}s:10:"bound_with";O:16:"SimpleXMLElement":0:{}s:15:"general_remarks";O:16:"SimpleXMLElement":0:{}s:6:"copies";O:16:"SimpleXMLElement":1:{i:0;s:1:"1";}s:11:"remarks_BPH";O:16:"SimpleXMLElement":0:{}s:3:"ICN";O:16:"SimpleXMLElement":1:{i:0;s:4:"neen";}s:10:"provenance";O:16:"SimpleXMLElement":0:{}s:7:"binding";O:16:"SimpleXMLElement":0:{}s:10:"size_hxwxd";O:16:"SimpleXMLElement":0:{}s:6:"BookID";O:16:"SimpleXMLElement":1:{i:0;s:4:"6271";}s:5:"repro";O:16:"SimpleXMLElement":0:{}} Is it possible to parse this string somehow? I need to display the keys and values in a list. I tried to use json_decode but it not returns anything, even with the second true parameter(json_decode($string,true))

    Read the article

  • Implementation problem. Htaccess in php

    - by Irwan
    I have a problem to fix the URL on my website at http://www.abelputra.com I need a solution: I want to change www.abelputra.com/software.php into www.abelputra.com/software I have read a tutorial like this: For .htaccess: RewriteEngine On RewriteRule ^ ([a-zA-Z0-9_-] +) $ index.php? Key = $ 1 RewriteRule ^ ([a-zA-Z0-9_-]+)/$ index.php? Key = $ 1 Then in php: index.php --- $Key=$ _GET ['key']; if ($key == 'home') { include ('index.php'); // Home page } else if ($ key == 'software') { include ('software.php'); // } else if ($ key == 'webdesign') { include ('webdesign.php'); // } The problem is: When I implemented the menu software.php index.php to call the page: www.abelputra.com/index.php?key=software what happens is the page that is shown is two pages later software.php index.php page underneath. Is it because calling functions "include ()"? index.php structures: Header Content - contains the opening words Footer software.php structure: Header Content - contains an explanation of my software Footer Sorry my english bad. im from Indonesia. Please solution .. thanks

    Read the article

  • How to access the members of this data in PHP?

    - by George Edison
    Okay. Now I give up. I have been playing with this for hours. I have a variable name $data. The variable contains these contents: (extracted by using var_export()) array ( 'headers' => array ( 'content-type' => 'multipart/alternative; boundary="_689e1a7d-7a0a-442a-bd6c-a1fb1dc2993e_"', ), 'ctype_parameters' => array ( 'boundary' => '_689e1a7d-7a0a-442a-bd6c-a1fb1dc2993e_', ), 'parts' => array ( 0 => stdClass::__set_state(array( 'headers' => array ( 'content-type' => 'text/plain; charset="iso-8859-1"', 'content-transfer-encoding' => 'quoted-printable', ), 'ctype_primary' => 'text', )), ), ) I removed some non-essential data. I want to access the headers value (on the second line above) - simple: $data->headers I want to access the headers value (on the fourteenth line after the stdClass:: stuff) - how? How can I possibly access the values within the stdClass::__set_state section? I tried var_export($data->parts); but all I get is NULL

    Read the article

  • Ajax and PHP problem not sending mail

    - by Dumbledore of flash
    Hi all , I have a problem here, I have two files form.php and index.php , my form.php has an ajax to fetch data from index.php , also my index.php has a mail function which is running perfectly when we run index.php directly, but when i form.php to fetch data from index.php this mail function is not running ..... can any body tell me whats the problem why ajax does not make my index.php send mail ?????

    Read the article

  • Passing variables from PHP to Javascript back to PHP using Ajax.

    - by ObjectiveJ
    I hope this makes sesne, please bare with me. So I have a PHP page that contains variables, I have some radial boxes, and on click of them, it calculates a price for the item you have clicked on. I do this by activating a js function that I have passed some variables to. Like so. PHP: <?php $result = mssql_query("SELECT * FROM Segments ORDER BY 'Squares'"); if (!$result) { echo 'query failed'; exit; } while ($row = mssql_fetch_array($result)) { ?> <span><?php echo $row["Squares"]; ?></span><input name="squares" type="radio" onclick="ajaxCases('<?php echo $row["Squares"]; ?>', '<?php echo $row["StartCaseID"]; ?>', '<?php echo $row["StartMatrixPrice"]; ?>')" value="<?php echo $row["Squares"]; ?>"<?php if ($row["Squares"] == "1") { ?> checked="checked" <?php }else{ ?> checked="" <?php } ?>/> <?php } ?> As you can see onclick it goes to a function called ajaxcases, this function looks like this. function ajaxCases(squares,start,price){ $('#step1').html('<p style="margin:100px 0px 0px 100px"><img src="images/ajax-loader-bigindic.gif" width="32" height="32" alt="" /></p>'); $('#step1').load("ajax-styles.php?squares="+squares); prevId1 = ""; document.varsForm.caseid.value=start; $('#step1price').html('<span style="margin:0px 0px 0px 30px"><img src="images/ajax-loader-price.gif" width="24" height="24" alt="" /></span>'); $('#step1price').load("ajax-step1-price.php?Squares="+Squares); return true; } This then goes to a php page called ajax-step1-price.php and I try to recall the variable Squares. However it doesn't work, I thought it was a GET however that returns undefined. In Summary: I would like to know how to pass a variable from PHP to JS then back to PHP, or if someone could just tell me where I am going wrong that would be greatly appreciated.

    Read the article

  • Security of PHP script, embedded or otherwise

    - by typoknig
    Hi all, I am curious about the security of PHP on an HTML webpage where PHP code is embedded (a webpage that would exist on the server as "webpage.php") or on a PHP script that may be referenced by an HTML page (that is, a PHP script that is not actually part of a webpage that exists on the server as "something.php" and is referenced by "webpage.html"). Getting to the point, let us say that if the source code of my PHP script is known by anyone it would be a very big problem. I know that when you view the source of a PHP page in a browser the PHP script is not shown, but what if the PHP server failed and the HTML still loaded (is this even possible), would a user be able to see the PHP script? To be more general, is there ANY possible way that a user could access the source of a PHP script from a web browser, and if so, how do I prevent it?

    Read the article

  • Using PHP Frameworks to get Web 2.0 or Ajax and Other Special Features

    - by user504958
    I'm still struggling to understand when or how to use a framework such as Zend or Yii. Here's some of the features I'm going to need on my next project and I don't understand frameworks well enough to know where the framework fits into the picture. I won't say exactly what the project is but think about something like Yelp or Merchant Circle, on a smaller scale of course - a directory project. It will contain a search box and links to all and/or popular categories. 1) Autosuggest in Search box. (I already know how to do this using jQuery) 2) Analyze the search terms entered into the search box to determine if they misspelled a word. Offer to correct the misspelling or automatically correct the word and show relevant results. 3) Offer items, links, or ads that are related to their search term. 4) Allow users to determine which fields are shown. 5) Allow users to sort the results however they choose. 6) Allow editing of records on a grid/list view. Post form without refreshing the page. Delete or Add records without going to a different page or reloading the current page.

    Read the article

  • Need to sort 3 arrays by one key array

    - by jeff6461
    I am trying to get 3 arrays sorted by one key array in objective c for the iphone, here is a example to help out... Array 1 Array 2 Array 3 Array 4 1 15 21 7 3 12 8 9 6 7 8 0 2 3 4 8 When sorted i want this to look like Array 1 Array 2 Array 3 Array 4 1 15 21 7 2 3 4 8 3 12 8 9 6 7 8 0 So array 2,3,4 are moving with Array 1 when sorted. Currently i am using a bubble sort to do this but it lags so bad that it crashes by app. The code i am using to do this is int flag = 0; int i = 0; int temp = 0; do { flag=1; for(i = 0; i < distancenumber; i++) { if(distance[i] > distance[i+1]) { temp = distance[i]; distance[i]=distance[i + 1]; distance[i + 1]=temp; temp = FlowerarrayNumber[i]; FlowerarrayNumber[i] = FlowerarrayNumber[i+1]; FlowerarrayNumber[i + 1] = temp; temp = BeearrayNumber[i]; BeearrayNumber[i] = BeearrayNumber[i + 1]; BeearrayNumber[i + 1] = temp; flag=0; } } }while (flag==0); where distance number is the amount of elements in all of the arrays, distance is array 1 or my key array. and the other 2 are getting sorted. If anyone can help me get a merge sort(or something faster, it is running on a iPhone so it needs to be quick and light) to do this that would be great i cannot figure out how the recursion works in this method and so having a hard time to get the code to work. Any help would be greatly appreciated

    Read the article

  • PHP delete script, return to 'viewsubjects.php?classroom_id=NO VALUE'

    - by Derek
    Hi, As the title states... I am deleting a 'subject' from a 'classroom' I view classrooms, then can click on a classroom to view the subject for that classroom. So the link where I am viewing subjects looks like: viewsubjects.php?classroom=23 When the user selects the delete button (in a row) to remove a subject from a class, I simply want the user to be redirected back to the list of subjects for the classroom (exactly where they were before!!) So I though this is simply a case of calling up the classroom ID within my delete script. Here is what I have: EDIT: corrected spelling mistake in code (this was not the problem) $subject_id = $_GET['subject_id']; $classroom_id = $_GET['classroom_id']; $sql = "DELETE FROM subjects WHERE subject_id=".$subject_id; $result = mysql_query($sql, $connection) or die("MySQL Error: ".mysql_error()); header("Location: viewsubjects.php?classroom_id=".$classroom_id); exit(); The subject is being removed from the DB, but when I am redirected back the URI is displaying with an empty classroom ID like: viewsubjects.php?classroom_id= Is there a way to carry the classroom ID through successfully through the delete script so it can be displayed after, allowing the user to be redirected back to the page? Thanks for any help!

    Read the article

  • PHP: Collect all variables passed to a function as array?

    - by Industrial
    Hi everybody, I was thinking about the possibility of accessing all the variables that are passed into an function, and merge them into an array. (Without passing variables into an array from the beginning) Pseudo-code: // Call function newFunction('one', 'two', 'three' ) ;// All values are interpreted as a one rray in some way // Function layout newFunction( ) { // $functionvariables = array( All passed variables) foreach ($functionvariable as $k => $v) { // Do stuff } }

    Read the article

  • PHP - Class Inherit problem

    - by TatMing
    I have A.php and B.php A.php <?php error_reporting(E_ALL); ini_set("display_errors",1); class myClass { function hello() { return 'hello'; } } ?> B.php <?php error_reporting(E_ALL); ini_set("display_errors",1); require_once('/A.php'); $a = new myClass(); testing(); function testing() { echo $a ->hello(); } ?> B.php inherits A.php , if i run B.php,but it show "Fatal error: Call to a member function hello() on a non-object." So the question is simple, how can i correct this ,but "$a = new myClass();" is not inside the function, since in .NET world can do this, i believe PHP also possible. And one more question is, what is the modify of function in A.php ,if i have not state private/public/protected???

    Read the article

  • nginx: rewrite a non-existent php-file to another php-file with all arguments

    - by at0m33
    i really need help here. Sitting for some time now and dont figured it out. I want to realize a very simple task - rewrite a non-existent php file to another existant php file with all arguments like: this http://example.com/nonexistent.php?url=google.com to -> http://example.com/existent.php?url=google.com I tried something like this: rewrite ^/nonexistent.php /existent.php; Which dont works (File not found). But redirect a non-existent html file to a php file like this: rewrite ^/nonexistent.html /existent.php; works. I dont want to rewrite a html file, but this is still a confusing behaviour. Therefore it tried also something like this (and some variations): rewrite ^/nonexistent.php?url=^(.*)$ /existent.php?url=$1; which is also not working. (Maybe the syntax is bad) Any help here? It would be very nice!

    Read the article

  • extract a specific part from a html document , php cURL , php, preg_match

    - by user331071
    Hello ! I'm trying to extract some information from a webpage using php cURL+preg_match or any other function but for some reasons it doesn't work at all . For example from this page http://www.foxtons.co.uk/search?location_ids=1001-29&property_id=712128&search_form=map&search_type=LL&submit_type=search I want to extract the title which is "4 bed house to rent, Caroline Place, Bayswater, W2", the price which is "2,300" and the description which starts at "This fantastic..." and ends at "(Circle and District Lines). " I tried to use php cURL + dom but I'm getting a lot of errors like this "htmlParseEntityRef: expecting ';' in Entity, line: 243" and no result displayed Also I tried to use preg_match or preg_match_all but doesn't work either . A very basic example would be highly appreciated ! thank you !

    Read the article

  • php, curl , php curl , multipart/form-data , upload picture redirect

    - by Michael
    I'm trying to upload some pictures using php cURL on a classified ad website .I think that I set all the parameters properly but I see that there is a kind of redirect after I post the picture . The issue is that the url where I'm getting redirected gives 404 error instead to return the html that it does when I make the post with a normal browser . here is the php code that I have so far " $URL = "http://api.classistatic.com/api/image/upload"; $s = "PAD001"; $v = "2"; $n = "k"; $a = "1:a126581b8150ddc1337cabce28f2feb53849fd143bd6e42649f90175c0e023e3"; $u = "@/var/www/html/artwork/tmp/!BszBLV!EGk~$(KGrHqEOKicEvMi8HVg(BL5ZbWvs0g~~_1.JPG"; $htmlContent = $baseClass-processPicturerequest($URL, $s, $v, $b, $n, $a, $u); The log from server is as following : http://pastebin.com/gZqPgsFX

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >