Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

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

Posts: 128
Name: Jose daSilva
Trades: 0
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
 
 
Register now for full access!
Old 06-04-2008, 07:32 PM Re: Save image
Arenlor's Avatar
Ultra Talker

Posts: 462
Name: Jerod Lycett
Location: /home/arenlor
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.12272 seconds with 12 queries