Jump to content

Archived

This topic is now archived and is closed to further replies.

ahmed17

plz help me

Recommended Posts

[color=red][b]i want to know how i can tie php with ms acess and excel files ...?
note! i am using mysql but i read article say u can tie php with ms acess or excel but
how ?..its the prolobem [/b] [/color]
********************************************************
--------------------------------------------------------------------------------

hello everybody . i want to know how i can install gd libary of php to use it

note !
i found in extensions folder the dll of gd "php_gd2.dll" and found it included in
php.ini (configuration) ........wat i do ,plz help me ?
*******************************************************
----------------------------------------------------------------------------------

plz help me  to correct this script to upload


[code][sup] <html>
<head>
<title> upload script</title>
</head>
<?php
//file_dir variable on line 6 to store the file path to our upload directory
$file_dir = "what  i    write    here  ?";
//$file_url on line 7 to store the URL of the same directory
$file_url = "what  i    write    here  ?";

foreach( $HTTP_POST_FILES as $file_name => $file_array ) {
  print "path: ".$file_array['tmp_name']."<br>\n";
  print "name: ".$file_array['name']."<br>\n";
  print "type: ".$file_array['type']."<br>\n";
  print "size: ".$file_array['size']."<br>\n";

  if ( is_uploaded_file( $file_array['tmp_name'] )
    && $file_array['type'] == "image/gif" ) {
    move_uploaded_file( $file_array['tmp_name'], "$file_dir/$file_name")
      or die ("Couldn't copy");
    print "<img src=\"$file_url/$file_name\"><p>\n\n";
  }
}

?>
<body>
<form enctype="multipart/form-data" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
<input type="file" name="fupload"><br>
<input type="submit" value="Send file!">
</form>
</body>
</html>[/sup][/code]

Share this post


Link to post
Share on other sites
Is PHP installed on your local computer?

If it is look in the php.ini file file for this line and uncomment it

[b];extension=php_gd2.dll[/b]

to

[b]extension=php_gd2.dll[/b]

and copy that php_gd2.dll file to the windows folder

Share this post


Link to post
Share on other sites
If you want to use PHP with MS Access Database I believe you'll need to use the [url=http://php.net/odbc]ODBC[/url] driver functions. I did a quick search on this and found a tutorial over at [url=http://www.phpbuilder.com/columns/siddarth20000228.php3?page=1]phpbuilder.com[/url] on how to connect to MS Access with PHP.

To install gd on windows. All you have to do is enable the gd extension in the php.ini, as advised in the post above

Share this post


Link to post
Share on other sites
may god bless you ..i am using local server ....i want any one help me to correct the upload script
[quote]$file_dir = "what  i    write    here  ?";[/quote]
  [quote]$file_url = "what  i    write    here  ?";[/quote]

Share this post


Link to post
Share on other sites
Did you write that code or did someone else write that script for you? If someone else wrote, it'll be best if you ask them. If you wrote then surely you must know.

But anyway. For this:
[code=php:0]$file_dir = "what  i    write    here  ?";[/code]

You need to put the absoulute path to where the file being uploaded will go to.  For example if you want the uploaded files to go to a folder called images which is in your document root folder, you'll use this:
[code=php:0]$file_dir = $_SERVER['DOCUMENT_ROOT'] . '/images/';[/code]


For this:
[code=php:0]$file_url = "what  i    write    here  ?";[/code]

You put in the url to the file dir, eg mysite.com/images/
[code=php:0]$file_url = "http://www.mysite.com/images/";[/code]

Share this post


Link to post
Share on other sites

×

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.