Search Results

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

Page 257/1708 | < Previous Page | 253 254 255 256 257 258 259 260 261 262 263 264  | Next Page >

  • PHP cannot find .net assembly in the .net-4 GAC

    - by stacker
    <?php $console = new DOTNET("ProjectX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=KeyTokenHere-i used a real value here", "ProjectX.Core.Services.ServicX"); echo '1'; ?> The error message: Fatal error: Uncaught exception 'com_exception' with message 'Failed to instantiate .Net object [CreateInstance] [0x80070002] The system cannot find the file specified. What's the problem can be?

    Read the article

  • simple php Dollar $ evaluation in string questions

    - by Mirage
    I have always been confused that .e,g in php i have sql statement $qry = "select * from table where id = $id"; now can i insert "$" directly inside the quotes or i have to use $qry = "select * from table where id =".$id." "; or $qry = 'select * from table where id = $id'; or $qry = 'select * from table where id = '$id''; Which is correct

    Read the article

  • PHP output of foreach loop into a new array.

    - by RobHardgood
    I know I'm probably missing something easy, but I have a foreach loop and I'm trying to modify the values of the first array, and output a new array with the modifications as the new values. Basically I'm starting with an array: 0 = A:B 1 = B:C 2 = C:D And I'm using explode() to strip out the :'s and second letters, so I want to be left with an array: 0 = A 1 = B 2 = C The explode() part of my function works fine, but I only seem to get single string outputs. A, B, and C.

    Read the article

  • Using DateTime in PHP, generating bad unix epoch time from $foo->format('U')

    - by Jazzepi
    I can't seem to get the correct Unix epoch time out of this PHP DateTime object. $startingDateTime = "2005/08/15 1:52:01 am"; $foo = new DateTime($startingDateTime, new DateTimeZone("America/New_York")); echo $foo-format('U'); which gives 1124085121 Which is Mon, 15 Aug 2005 00:52:01 GMT -500 (according to http://www.epochconverter.com/) but that's incorrect by an hour. It SHOULD be 1124088721 and spit back at me as Mon, 15 Aug 2005 01:52:01 GMT -500 Any help would be appreciated.

    Read the article

  • Simplest way to convert all html links in a string using PHP

    - by Gaz
    I am trying to convert a block of text that contains html text - i'd like to find all http links and convert them for link tracking purposes. So eg anything like this in a string would be converted to the latter <a href="http://www.google.com">Some Link</a> <a href="http://www.mysite.com/tracking.php?url=www.google.com">Some Link</a> Can anyone how to do this taking into account the original string will consists of all sorts of html, images etc..

    Read the article

  • Multiple items with PayPal button and PHP

    - by user146780
    I'm building a website where I basically want my checkout to work like this website: http://www.solutionkaizen.com/html/boutique.php It allows you to enter the quantity for each item and then press a button which brings you to PayPal and lists how many Products you have. On PayPal's website, all the info I found seems to lead to me needing a shopping cart. If this is absolutely necessary, how could I implement that? Thanks

    Read the article

  • Export data to word from php with the headers on all the pages

    - by udaya
    Hi I am exporting data from php page to word document I received the result in word format but when the data's are in excess number then the header are not available for the consecutive page ex my first page has title Country Name Country uday India akila India my second page has no title such as name and title kiran pakisthan vikie america how to get the titles on the consecutive pagess

    Read the article

  • When does a PHP script end?

    - by allyourcode
    In my mind, a web app something that runs continuously; therefore, I'm confused by documentation pages that talk about the "end" of a PHP script (eg this one). Such references seem to refer to the end of each web request, but if the script ends there, doesn't that mean that the OS has to setup a whole new process for each request? That seems unlikely, because spinning up a whole new process is expensive, and be very inefficient for the whole site.

    Read the article

  • HTML Scraping in Php.

    - by tsellon
    I've been doing some html scraping in PHP using regular expressions. This works, but the result is finicky and fragile. Has anyone used any packages that provide a more robust solution? A config driven solution would be ideal, but I'm not picky.

    Read the article

  • PHP 5: What DAL are you using?

    - by overthetop
    hello I'm new to PHP and I recently started learning Zend Framework. What DAL are you using? Do you think that Zend_Db_* can do the magic? I need it mainly for MySql db. Does it have any limitations and can I use it in big project without any problems because I don't want to go the wrong way. 10x

    Read the article

  • Best PHP timezone list

    - by jimbo
    I have looked over the PHP list of supported timezones, but the whole list is a little long to include in a drop-down menu, for the user to select his or her timezone. Is there a list with the main city/area on that can be used? My geography is terrible and add that to not knowing all the area and which timezone they fall into it could be a long day to construct the list my self! Thanks in advance

    Read the article

  • PHP regular expression for positive number with 0 or 2 decimal places

    - by Peter
    Hi I am trying to use the following regular expression to check whether a string is a positive number with either zero decimal places, or 2: ^\d+(\.(\d{2}))?$ When I try to match this using preg_match, I get the error: Warning: preg_match(): No ending delimiter '^' found in /Library/WebServer/Documents/lib/forms.php on line 862 What am I doing wrong?

    Read the article

  • Managing a user's PHP session with Cocoa Touch

    - by Calvin L
    I'm building an iPhone app, which will allow users to log in to a PHP web server that authenticates the user and starts a session. My idea for managing a session is to create a singleton User class that has a sharedLogin method. Would it be prudent to store the session variable in the shared instance in order to maintain the session?

    Read the article

  • Add Access-Control-Allow-Origin to header in PHP

    - by SANDeveloper
    I am trying to workaround CORS restriction on a WebGL application. I have a Web Service which resolves URL and returns images. Since this web service is not CORS enabled, I can't use the returned images as textures. I was planning to: Write a PHP script to handle image requests Image requests would be sent through the query string as a url parameter The PHP Script will: Call the web service with the query string url Fetch the image response (web service returns a content-type:image response) Add the CORS header (Add Access-Control-Allow-Origin) to the response Send the response to the browser I tried to implement this using a variety of techniques including CURL, HTTPResponse, plain var_dump etc. but got stuck at some point in each. So I have 2 questions: Is the approach good enough? Considering the approach is good enough: I made the most progress with CURL. I could get the image header and data with: $ch = curl_init(); $url = $_GET["url"]; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:image/jpeg')); //Execute request $response = curl_exec($ch); //get the default response headers $headers = curl_getinfo($ch); //close connection curl_close($ch); But this doesn't actually change set the response content-type to image/jpeg. It dumps the header + response into a new response of content-type text/html and display the header and the image BLOB data in the browser. How do I get it to send the response in the format I want? Managed to get it working: $ch = curl_init(); $url = $_GET["url"]; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); //Execute request $response = curl_exec($ch); //get the default response headers $headers = curl_getinfo($ch); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); header('Content-Type: image/jpeg'); header("Access-Control-Allow-Origin: *"); // header("Expires: Sat, 26 Jul 2017 05:00:00 GMT"); //close connection curl_close($ch); flush();

    Read the article

  • php file_get_content and &amp;

    - by Patrick
    Hello all, I'm trying to use php's file_get_content('a url'); The thing is if the url has '&' in it, for example file_get_content('http://wwww.google.com/?var1=1&var2=2') it automatically make a requests to wwww.google.com/?var1=1&amp;var2=2 How do I prevent that from happening?

    Read the article

  • Example of forum in Object Oriented PHP

    - by Martin Trigaux
    Hello, I'm trying to learn to use PHP with an object oriented scheme. I think I understand the concept but I need real example, a forum exactly (the closest to what I want to do). I know PhpBB but it's maybe too complicated to fully understand it so I'm looking for something simpler but still in object oriented. Do you know any ? Thank you

    Read the article

< Previous Page | 253 254 255 256 257 258 259 260 261 262 263 264  | Next Page >