User Profile

Collapse

Profile Sidebar

Collapse
Muffinthief
Muffinthief
Last Activity: Nov 15 '08, 01:11 AM
Joined: May 13 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Muffinthief
    replied to ./ on server?
    in PHP
    Ok strike that, I've fixed that problem, but now I have another. I can't read or write files on the server. I'm assuming that the permissions just aren't letting me, but I think my server doesn't support chmod. Should I just look for a new server, or is there a way around this?
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to ./ on server?
    in PHP
    This all works when I run on localhost. Would it be different on the server?
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to ./ on server?
    in PHP
    I'm doing "is_dir('./blogs')" and it's returning false.
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to ./ on server?
    in PHP
    If I'm on a windows server do I have to use ".\" instead of "./"? Just a thought...
    See more | Go to post

    Leave a comment:


  • Muffinthief
    started a topic ./ on server?
    in PHP

    ./ on server?

    I recently developed a website for my school. I was working off localhost for the development. When time came to upload the server we had didn't accept "./" or "../" as soft paths. Am I doing something wrong? Is there anyway to solve this?

    Thanks.
    See more | Go to post

  • Muffinthief
    replied to Read data from serverside file?
    Ok wow, I'm smart. (sarcasm) Thanks!
    See more | Go to post

    Leave a comment:


  • Muffinthief
    started a topic Read data from serverside file?

    Read data from serverside file?

    Hey, This is a pretty simple question. Is there any easy way to read data from a server side file. I know that Javascript is client side. I was thinking you write a php script to get the data, then open that url in Javascipt? Is it possible to use javascript to get the code of a url? Sorry this is probably very noobish. Thanks guys!
    See more | Go to post

  • Muffinthief
    replied to Parse interpret code from file?
    in PHP
    ok wow I'm stupid. Include. Forget this thread.
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to Parse interpret code from file?
    in PHP
    haha sorry, so in the main file I have:

    Code:
    <?php function writestatic($item) {
    		$path = softrootpath() . '/static-items/'.$item;		
    		$f = fopen($path, 'r');
    		$data = fread($f, filesize($path));
    		echo $data;
    } ?>
    then in static-items/menu I have

    Code:
    <div id="menucontainer">
    	<div id="menunav">
    		<ul>
    		<li><a
    ...
    See more | Go to post
    Last edited by Muffinthief; Aug 21 '08, 02:13 AM. Reason: forgot code tags

    Leave a comment:


  • Muffinthief
    started a topic Parse interpret code from file?
    in PHP

    Parse interpret code from file?

    Hey this is an odd question. So I'm designing a website with certain elements repeating. So I put the code for those sections into individual files, then would have php load the html into the page, so if I wanted to change something I would only have to change it in one place. The problem is that some of the parts contain php code, that is echoed into the document as straight text, and not interpreted. Is there a way to have php do multiple passes,...
    See more | Go to post

  • Muffinthief
    replied to Connect through proxy?
    in PHP
    Sorry, but I'm going to have to bump this one more time...
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to Connect through proxy?
    in PHP
    Ok guys well here's a simplified example of what I'm trying to do.

    I start the proxy using "ssh -D 1080 mchang@192.168. 107.30"

    this starts a proxy to another part of the machine (I'm using Solaris 10) on part 1080.

    Then I have the php code.
    Code:
    <?php
    require_once './HTTP/Request.php';
    
    PEAR::setErrorHandling(PEAR_ERROR_PRINT);
    
    $webAddress =
    ...
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to Connect through proxy?
    in PHP
    Bump again, sorry guys.
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to Connect through proxy?
    in PHP
    Ok guys thanks for the help. after a little more research I've tracked down my problem. The Flickr API (or at least what I'm using) uses PEAR. and you need to specify a proxy when making an HTTP request. Following the example from: http://www.collicott.n et/jess/examples/php/pear/http_request/

    I end up with:

    Code:
    <?php
    require_once 'HTTP/Request.php';
    
    $params['proxy_host'] = '127.0.0.1'; //proxy is
    ...
    See more | Go to post

    Leave a comment:


  • Thanks! this worked.
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to Connect through proxy?
    in PHP
    Bump. Anybody? Sorry this is a kind of bizarre problem.
    See more | Go to post

    Leave a comment:


  • Muffinthief
    replied to Get program's return data?
    in C
    This was for C++, I was just using exec as an example of what I was looking for, and popen was it. So Thanks!
    See more | Go to post

    Leave a comment:


  • Muffinthief
    started a topic Get program's return data?
    in C

    Get program's return data?

    Well this is probably a noob question but here it goes.
    How does one go about getting the output from a program?
    I know you run system() but that just returns an integer.
    Is there perhaps a command similar to exec() in PHP?
    Or do you have to have the program you're running write to a file.

    Well thanks for the help.
    See more | Go to post

  • Muffinthief
    started a topic Passing Arguments to php from command line?
    in PHP

    Passing Arguments to php from command line?

    Hi, I have a pretty simple question.
    Is it possible to pass arguments to php if you're running it from command line instead of in a browser? Like:

    # /usr/local/bin/php test.php Hello

    Or could you do something like

    #/usr/local/bin/php test.php?arg=He llo

    (I tried the later and it didn't work but maybe I did something wrong.)
    See more | Go to post

  • Muffinthief
    started a topic Connect through proxy?
    in PHP

    Connect through proxy?

    Ok this question may seem odd, but I'll do my best to explain it.
    I'm writing a script for development purposes so this doesn't need to run in a browser, actually this would be a lot easier if it could, but it can't. I'm running it with:

    # /usr/local/bin/php script.php

    The script in question uses the Flickr API so it needs to connect to the internet. And here in lies the question. The way I'm connecting to the...
    See more | Go to post
No activity results to display
Show More
Working...