Reply
Save image
Old 06-04-2008, 05:35 PM Save image
Experienced Talker

Posts: 48
Name: Jose daSilva
Hi
I have a php file called saveimage.php that saves my images in a folder called images on the root of a X website:
$disk_root="..../local/home/x/x.com//";
I would like to use the same saveimage.php file to save at the same time the same image on the root of a Y website:
$disk_root="..../local/home/x/y.com//";
Here it is the contents of the saveimage.php file:
<?
functionmysql_ligar($mysql_host,$mysql_user,$mysql_pass)
{
if(($mysql=mysql_connect $mysql_host,$mysql_user,$mysql_pass))==0)return0;
else return$mysql;}functionmysql_base ($mysql,$mysql_base){if(($out=mysql_select_db($mysql_base,$mysql))==0)return0; else return1;}
include("call.inc.php"); $mysql=$connect; mysql_base($mysql,"x");
$disk_root="/.../local/home/x/x.com//";
if((!isset($client))||(!isset($img)))die("Without client or image"); $name=sprintf("%simage/file%06d%06d.bin",$disk_root,$client,$img);

if<FONT size=3><B>((<FONT face="Courier New"><FONT color=#800080>
josil is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 06-04-2008, 07:32 PM Re: Save image
Arenlor's Avatar
Ultra Talker

Posts: 463
Name: Jerod Lycett
Location: /home/arenlor
Can you please use PHP tags around your code? Also try editing your $disk_root and $name lines to be the following:
PHP Code:
$disk_root0 "/.../local/home/x/x.com//";
$disk_root1 "/.../local/home/x/y.com//";
//I'm not familiar with the use of ... in a location, also why do you use two trailing slashes?
$name0 sprintf("%simage/file%06d%06d.bin",$disk_root0,$client,$img);
$name1 sprintf("%simage/file%06d%06d.bin",$disk_root1,$client,$img); 
I don't know what you do with it after this because you didn't post your full code.
__________________
PHP Code:
<?php echo "Hello World"?>
HTML Code:
<html><head><title>Hello World</title></head><body><p>Hello World</p></body></html>
Arenlor is offline
Reply With Quote
View Public Profile Visit Arenlor's homepage!
 
Reply     « Reply to Save image
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14312 seconds with 13 queries