Link to home
Start Free TrialLog in
Avatar of Ricky anu
Ricky anu

asked on

php Codginator (IF THIS CODE IS RIGHT THEN WHY IS IT NOT WORKING ON ONLINE SITE )(HOSTELHOSTLE.COM) PLZ TELL ME

IT WORKS FLUENTLY ON LOCALHOST BUTON SERVER YOU CAN CHECK IT
PLZ TELL ME I M GETTING FRUSTETED
error.php
MY_upload.php
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Firstly, I'd suggesto you to carefully check every config file needed: often, moving from localhost to online server we forget to change a path or something else which prevent the app to work :-)
Second, I would like you tell us why you say it doesn't work? Doesn't it upload files? Gives it some error message? What is the message? What you expect to happen and what actually happens?
Avatar of Ricky anu
Ricky anu

ASKER

actually code works fully on localhost
it do every thing which i need but

when i upload it on server hsotelhostle.com
 there is'nt entry in db & not going any pic in upload file

But all cloums of database (except imges colum are filled)
i check it again
& i upload it again

but it doesn't working
& don;t giving any error

plz guide me
I think this problem related to the "upload" directory. It is either permission or path. I suggest you to change "upload" directory permission to 777 (just to test) and try again. If the problem still exist, add this code after the line:
$this->load->library('upload',$config);

Open in new window

This is the code:
if (read_file('upload'))
echo "existed";
else
echo "not existed";

Open in new window

I DO AS YOU SAY
[
if (read_file('upload'))
echo "existed";
else
echo "not existed";
]
BUT THERE IS NOT ANY ERROR OR CHANGE
PLZ TELL ME SIR WHAT IS IT GOING ON

BECAUSE
I CAN NOT GUESS THAT WHAT PROBLEM IS IT
AND WHAT I M FACING
What was the output?? "existed" or "not existed" ??
And did you set the permissions for the "upload" directory??
no sir there is not any output
i do it like this

[ public function registration()
      {
        $this->load->view('registration');
               
        $this->load->library('javascript');
       
 
             
       if($this->input->post('submit'))
       {
          $this->load->helper('date');

          $config['allowed_types']='gif|jpg|png';
          $config['upload_path']='upload/';
          $this->load->library('upload',$config);
          if (read_file('upload'))
echo "zasfczfaszfsdfsaafdsfgdsfsdfsdfsdfdsgfdsgfazdfsafsdfdsf//existed";
else
echo "dsfafazfssssssssssssssssssafsaffffffffffffffffffffffffffff//not existed";
         
          $str = "img";
          for($i=1; $i<= 7; $i++){...............................

]


not working till now what i do?
plz sir guide me

what i can do

this is became a big headache for me
plz sir guide me

what i can do

this is became a big headache for me
ASKER CERTIFIED SOLUTION
Avatar of Question Mark?
Question Mark?
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I M IMPRESSED YOU ARE ACCURATE.IMPRESSIVE