Search Results

Search found 31819 results on 1273 pages for 'sphinx php'.

Page 105/1273 | < Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >

  • generate PHP classes from XSD?

    - by Qwerty
    Is there in the world analogues of JavaBeans or JAXB for PHP? Is it possible to generate PHP classes from XML schema? It's common practice to publish API's as XSD schemas. Java and C# guys can get advantage of this by generating classes right from XSD. Is there same tool for PHP?

    Read the article

  • html-embedded php code not executing when hosted on iis

    - by Jack
    <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <TITLE></TITLE> </HEAD> <BODY> <?php echo '<p>Hello World</p>'; ?> </BODY> </HTML> When I run the above code in a browser, firefox renders it like this: Hello World '; ?> I am doing my coding in Windows XP/IIS 5.1. I have PHP set up correctly because I have no problem running .php files. The problem, it seems to me, is that IIS can't render php code embedded inside html. Does anyone know how to fix this problem or should i switch to Apache?

    Read the article

  • php class crash course

    - by rabidmachine9
    Hello people, I'm sorry for this question but I'm getting crazy trying to write my first php clash, it is supposed to connect me to server and to a database but I'm always getting this error: Parse error: syntax error, unexpected ',', expecting T_PAAMAYIM_NEKUDOTAYIM in /Applications/XAMPP/xamppfiles/htdocs/classTest/test.php on line 9 thanks in advance, here is the code: <?php // include 'DBConnect.php'; class DBConnect { function connection($hostname = "localhost", $myname = "root", $pass = ''){ mysql_connect(&hostname, &myname, &pass) or die("Could not connect!"); //Connect to mysql } function choose($dbnam){ mysql_select_db(&dbnam) or die("Couldn't find database!"); //fnd specific db } } $a = new DBConnect(); $connect = $a->connection("localhost", "root"); $a->choose('mydb'); ?>

    Read the article

  • PHP debugging or performance Hook

    - by Joshua
    In an interpreted language like PHP it is possible in theory to set up some sort of callback function that would be run indiscriminately after every line of code. I am wondering if such a thing exists in PHP or if such a thing could be accomplished in any way? Such a feature could be useful for diagnostics or performance tests. Does anyone know of such a mechanism in PHP?

    Read the article

  • Echo html+php from database

    - by pg-robban
    I am working on a site which deals with a lot of texts in HTML, so recently I learned PHP and moved them into a MySQL database and echo the contents given a specific chapter and section. Now this works relatively fine, the HTML shows up properly. However, in some parts I have included PHP function calls, and these doesn't seem to be evaluated - rather, they get just inserted into the source code (and thus invisible for the page viewer), never doing anything. They did work when they were simple .html files. How can I solve this? For example, a text can look like this: <?php printChapterName(); ?> <p>Some text</p> ... <?php showImage($name, $alt-text); ?> ... This just shows the text on the page. Edit: The functions are echo:ing some HTML.

    Read the article

  • iPhone: Try to send html code to a php script (but fail)

    - by Marc-André Weibezahn
    Hello all, I am trying this for an iPhone app in Xcode: create html code for a website on the fly sending it to a php-script and getting the response with this code: NSError * error = [[[NSError alloc]init]autorelease]; NSURL * phpURL = [NSURL URLWithString: @"http://www.mydomain.com/myscript.php?mywebsite= (...websitestring...) ];NSString * myResponse = [NSString stringWithContentsOfURL:phpURL encoding:NSUTF8StringEncoding error:&error]; It does not work. It should not be a problem of the php code because when I replace the websitestring which contains the html code with "hello" or something, this is accepted. (the script then creates a file "test.html" with the content I sent.) But when I put html code in it, I always get the error: Error Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256.)" UserInfo=0x322ec10 {} It seems that there are some things to consider when sending code to php? Thanks in advance!

    Read the article

  • Access control of page in php

    - by garcon1986
    Hello, I want to control the access in php website. I have a solution right now with switch case. <?php $obj = $_GET['obj']; switch ($obj) { case a: include ('a.php'); break; default: include ('f.php'); } ?> But when i have so many pages, it becomes difficult to manage them. Do you have better solutions? Right now, i develop the application using php4. And i want to use php5. Do you have any suggestions when i develop it using php5? Thanks

    Read the article

  • 3 small PHP errors I cannot decipher

    - by Dave
    *Notice: Use of undefined constant _ - assumed '_' in /.../uploader.php on line 45* Line 45 $newname = str_replace(array(' ', '&'), array('_', 'and'), trim( strip_tags( $_POST['name'] ) ) ) . _ . $formKey->generateKey() . '_' . time() . '.jpg'; Notice: Undefined index: approve in /.../uploader.php on line 81 Line 81 - the second last line here $query = sprintf("INSERT INTO `$db_name`.`the_table` (`id` , `name` , `photo` , `email` , `date` , `code` , `subscribe` , `approve` , `created` ) VALUES ( NULL , '%s', '%s', '%s', '%s', '%s', '%s', '1', CURRENT_TIMESTAMP );", mysql_real_escape_string($_POST['name']), mysql_real_escape_string($newname), mysql_real_escape_string($_POST['email']), mysql_real_escape_string($date), mysql_real_escape_string($_POST['code']), mysql_real_escape_string($subscribe), mysql_real_escape_string($_POST['approve']) ); Warning: Cannot modify header information - headers already sent by (output started at /.../uploader.php:45) in/.../uploader.php on line 102 Line 45 $newname = str_replace(array(' ', '&'), array('_', 'and'), trim( strip_tags( $_POST['name'] ) ) ) . _ . $formKey->generateKey() . '_' . time() . '.jpg'; Line 102 - the third line here if ($success == 'Done') { $page = 'uploader'; header('Location: ./thanks.php'); } else { echo "error"; }

    Read the article

  • PHP Dropdown menu [closed]

    - by rShetty
    <br><h2>Select a Tag</h2></br> <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("portal", $con); $query = "SELECT tag_name FROM tags"; $result = mysql_query($query); ?> <select name="tag_name" id="abc"> <option size=30 selected>Select</option> <?php while($array = mysql_fetch_assoc($result)){ ?> <option value ="<?php echo $array['tag_name'];?>"><?php echo $array['tag_name'];?> </option> <?php } ?> </select> <br><br> This is a snippet of code for getting the dropdown menu in the page. I have a database named portal and table named tags with tag_name as the attribute. Do help me to find the error in the program. I am not getting the tag_names in the dropdown menu

    Read the article

  • got undefined variable in php code

    - by Newbie New
    I got a error message when I run my php however the result is come out this is my code function cart() { foreach($_SESSION as $name => $value) { if ($value>0) { if (substr($name, 0, 5) == 'cart_'){ $id = substr($name, 5, (strlen($name)-5)); $get = mysql_query('SELECT id, name, price FROM products WHERE id=' .mysql_real_escape_string((int)$id)); while ($get_row = mysql_fetch_assoc($get)){ $sub = $get_row['price'] * $value; echo $get_row['name'].' x '.$value.' @ &pound'.number_format($get_row['price'], 2).' = &pound'.number_format($sub, 2).' <a href="cart.php?remove='.$id.'">[-]</a> <a href="cart.php?add='.$id.'">[+]</a> <a href="cart.php?delete='.$id.'">[Delete]</a><br />' ; } } $total += $sub; } } echo $total; } ?> I got a error message Notice: Undefined variable: total in C:\xampp\htdocs\shoppingcart\cart.php on line 54 which line 54 is echo $total; what's wrong with my code?? I think I have defined the code in $total += $sub; thanks for helping me :)

    Read the article

  • Access PHP var from external javascript file

    - by FFish
    I can access a PHP var with Javascript like this: <?php $fruit = "apple"; $color = "red"; ?> <script type="text/javascript"> alert("fruit: " + "<?php echo $fruit; ?>"); // or shortcut "<?= $fruit ?>" </script> But what if I want to use an external JS file: <script type="text/javascript" src="externaljs.js"></script> externaljs.js: alert("color: " + "<?php echo $color; ?>");

    Read the article

  • What is PHP like as a programming language?

    - by seanlinmt
    I am not really familiar with PHP, but I get the impression that it is like JavaScript (syntax-wise). What are the benefits of a dynamically typed language, when compared to a strongly typed language like C# or Java, and how would this help in the context of web development? What would make a dynamically typed language so attractive? Or, does the popularity of PHP have more to do with it being free? Okay, I think I better give a little more background to get more meaningful answers, because I am not wanting a flame war. I come from a C background, and when I moved into C# and Visual Studio. Having code completion, integration with an SQL database, huge existing class libraries and easy to access documentation, as well as new tools such as LINQ and ReSharper was like heaven. I didn't enjoy JavaScript before JQuery, but now I love it as well. Recently, I ported a PHP project over to C# and I used Zend to help me debug and understand more while porting - instead of maintaining two code streams. That also cut down on the cost of the server and maintenance. Getting into PHP would be nice. I think that Visual Studio has spoiled me - but again Eclipse is also equally spoiling. It would be nice to have an answer from someone who has experience developing both under PHP and .NET.

    Read the article

  • Visual PHP GUI IDE

    - by Joshua
    Does anybody know of a reliable, well-made tool for creating standalone desktop applications complete with GUI, using just PHP, or primarily PHP? I enjoy the R.A.D. and many other aspects of PHP and would like to use it for some non server/client projects.

    Read the article

  • PHP Echo current filename without extension

    - by Christian Nikkanen
    I'm working on a very simple homemade CMS that simply uses a rich text editor and database to save the website contents and displays them to visitors. Heres the save.php that saves it: <?php include 'mysqlconnection.php'; mysql_query("UPDATE Content SET Content='$_POST[edit]' WHERE PageName='$_POST[PageName]'"); mysql_close($con); ?> <?php header('Location:http://xxx.com/Kayttoliittyma'); ?> It just saves it to the database. The pagename part is the part where I need to echo the filename without the extension. It would echo to the forms hidden field. But how?

    Read the article

  • What is wrong with this php loop?

    - by Mark R
    I made a loop but it doesn't work. here's what I did: <?php if(is_tree('4')) { ?> <?php $show_after_p = 2; $content = apply_filters('the_content', $post->post_content); if(substr_count($content, '<p>') > $show_after_p) { $contents = explode("</p>", $content); $p_count = 1; foreach($contents as $content) { echo $content; if($p_count == $show_after_p) { ?> YOUR AD CODE GOES HERE < ? } echo "</p>"; $p_count++; } } ?> <?php else : ?> <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?> <?php endif; } ?> I need to make it work but don't know how. I'm guessing it's a simple syntax error I'm not seeing?

    Read the article

  • How to manually create Friendly URLs? (PHP)

    - by Ole Jak
    How to manually create Friendly URLs? (PHP) So I have created simple php file which echos requested string. Now it has form echo.php?string=bla+bla+bla&font=times I want to see it like echo/bla+bla+bla/times How to do such thing (not using external libs)?

    Read the article

  • How to use the php fopen() correctly

    - by Jacksta
    I am learning php, trying to use the fopen() function. The php file I am coding is in this directory /domains/xxxxx.com.au/public_html/phpfile.php What path do I specify for the file to be opened, the example I am looking at is based on a server on a pc where this is the file path $filename = "c:/newfile.txt"; not an online server.

    Read the article

  • memcache, wamp, php 5.4, win8

    - by user1406269
    I am using wamp, PHP 5.4 running on win 8, I can't seem to get PHP to acknowledge the memcache dll. I download php_memcache-3.0.8-5.4-ts-vc9-x86.zip (the only one I could find). I copied the dll to C:\wamp\bin\php\php5.4.12\ext I added extension=php_memcache.dll restart the server. but still I cannot use memcache, and it is missing from Loaded Extensions list. Please supply a step-by-step instruction on how to set this up, Thanks.

    Read the article

< Previous Page | 101 102 103 104 105 106 107 108 109 110 111 112  | Next Page >