Jump to content

abdfahim

Members
  • Posts

    535
  • Joined

  • Last visited

Everything posted by abdfahim

  1. if I get your question right, you should use something like this to make it simple, and avoiding confusion about single quote and double quote echo "<a href=\"?country=".$_GET['country']."&from_language=Russian&into_language=Latvian&submitted=true& page=".$x. "\">".$x."</a>;" for inserting any special character as text, just use "\CHARACTER" .. e.g. "\$"
  2. Dears, I am trying to integrate my php pages in LifeRay. Everything works fine except the page that create an image. Here is the code of the page which is not working, it shows garbage characters (same thing if I don't use header in a normal Apache environment). FYI, when I host them in my Apache server, the image shows perfectly. Anybody has any suggestion or useful link regarding this problem? This is the first time I am tying to use LifeRay. // Above this i set image properties by GD functions in $img variable header("Content-type:image/png"); imagepng($img); imagedestroy($img);
  3. thanks so much for the idea. I convert my code and it works fine.
  4. correction. stupid code, ofcourse I can't set 2 type of header content on the same page. But the main question still remains valid. How can I put that image in between text?
  5. I am not sure whether I understand what exactly you want or not, but you can try this Select user_id, login, count(user_id) from liked,users where liked.user_id=users.id GROUP BY user_id
  6. Dears, I want to output an image by imagepng function in between some texts. For that I used the below codes // Above this i set image properties by GD functions in $img variable ob_start(); echo "Text 1"; header("Content-type:image/png"); imagepng($img); imagedestroy($img); header("Content-type:text/html"); echo "Text 2"; ob_end_flush(); But unfortunately the image is not visible, rather it turns into some abnormal characters. But if I get rid of the texts (like below), image is printed perfectly. // Above this i set image properties by GD functions in $img variable ob_start(); header("Content-type:image/png"); imagepng($img); imagedestroy($img); ob_end_flush(); Anybody please help.
  7. that's great. I never used HTML parser. Just one thing, can you tell me how can I save the output rather then sending to browser?
  8. Dear expats, I want to get only the portion between <marquee></marquee> tag of an html document. Can you please validate the expression below. Say, I have whole html document in the variable $a. So, why $h1 is not returning properly? $h1 = preg_replace("/(.*?)<marquee[^>]*>(.*?)<\/marquee>(.*?)/i", "$2", $a); Sorry for being very weak in regex
  9. $user must contain a valid field name $result_1= mysql_query("SELECT * FROM `criteria` ORDER BY `".$user."` ASC");
  10. If your source array has same number elements in each sub-array, otherwise it will need little tweaking on this code $sourcearr = array( array("apple", "banana", "cantaloupe", "date"), array("asparagus", "broccoli", "carrot", "dandelion") ); for($i=0;$i<count($sourcearr[0]);$i++){ for($j=0;$j<count($sourcearr);$j++){ $targtarr[$i][]=$sourcearr[$j][$i]; } }
  11. Hi expats, I need to save a webpage (just like I open that website and do "Save Page As" from any web browser) and put the saved file in my server. Is it possible? I know, it looks like some client side job, but just wondering, there must have been some work around. Thanks,
  12. The link is http://www.dsebd.org/latest_share_price_scroll_l.php I want to read the price table of the stocks and dump in mysql. Now, the price list is a separate page because 1) If i read this link with file_get_contents or curl, it doesn't return the table 2) If you view the source, you will see a IFRAME embeded 3) There is a cool option in FirFox name "Save Frame As". If you use that, you can save on the table (iframe content) as separate html page. I just need this HTML page. I already have written the code to purse that html page. Thanks,
  13. Hi, is it possible? anybody has any idea? Thanks,
  14. Dear, I have page1.php where there is a iframe with source page2.php. How can I read page2.php? Both the pages are in external website, and if I directly point www.thatsite.com/page2.php, it shows blank page (no error). But if I load www.thatsite.com/page1.php in FIREFOX and use SAVE FRAME AS function, it does save page2.php successfully. Thanks,
  15. thanks to you I have solved it ! As you said, I might have some problem in php.ini, so I replace that with my backed up one. And, it starts working!! But, a strange thing I found that, all this problem is happening whenever I change the following line in php.ini doc_root = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs to this one doc_root = C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs !!! This is strange. Because my doc root is actually the later one !!! Rather there is no such directory existing like the 1st one ...
  16. This is the main problem, PHPINFO doesn't show mysql or mysqli section. I have installed php in C:/php. Apache and MySQL I have installed in "Program Files (x86)" folder (which is default location for installing 32 bit soft in a 64 bit OS).
  17. Hi, Thanks for details. Some of those I have already checked, some not. Plz find here the responses 1) Loaded Configuration File is C:\php\php.ini - same as my intended file. 2) I have extension_dir = "c:\php\ext" 3) Also, in php.ini, i have extension=php_mysql.dll extension=php_mysqli.dll 4) Both the files are present in C:\php\ext directory (rechecked) Now here is some new checks 5) in error.log in apache server, I haven't find any error listed against mysql 6) Now, this one might be the problem. Because I am very new to WIndows 7 64 bit, also I have installed 32-bit version of MySQL I am suspecting some problem like this. Can you please describe how to check this? Thanks, -Abd
  18. hello experts, i am still facing the same prob ... I have uninstall and reinstall the MySQL, but still same problem. Plz help. Btw, I have my PHP working. Also, MySQL is working individually (from command prompt). Just cant load the extension (though uncommented)
  19. yes .... as I said, with exactly same setup, I have the trio (apache-php-mysql) running in my desktop (only except, those are located in "program files", not in "program files (x86)"
  20. yes it is enabled .... as I said, same php.ini is working in my desktop without any problem ... extension=php_mysql.dll extension=php_mysqli.dll
  21. Hi, I have been using same php.ini and httpd.conf file for long. I have used the same 32-bit APACHE+PHP+MYSQL in my newly bought laptop with a new 64bit Windows 7 (previously I used 32-bit Vista). As a result, all 3 software installed in "Program Files (x86)" folder. I have managed to make Apache+PHP working. Also, 32-bit mySQL is also working (I can run query from command prompt). Only problem is any php can't communicate with mysql. Solution plz. I never worked in 64bit environment before. btw, phpmyadmin is showing error Cannot load mysql extension. Please check your PHP configuration
  22. Hi, How to run a batch file in administrative mode? normally I can run by system("cmd /c C:[path to file]"); Thanks,
  23. it'll be the date string read from a text file at the moment of insert
  24. Are you asking how you take 7 columns and insert them into a 6 column table? You can't. If you're asking how to ignore a specific column, read the previous reply more carefully. -Dan I haven't ask either of them .. I want to take 6 column from a table and insert them in a 7 column table whereas filling up the 7th column with a constant (don't say to use default coz that constant will vary with the user)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.