localhost

http://localhost/ not working with EasyPHP

匆匆过客 提交于 2019-12-10 04:30:15
问题 I've verified my host file in windows/system32/drivers/etc/ has an entry for localhost in it, but it's not going anywhere. I have to have a port number in the URL: http://127.0.0.1:8888/ Is there anything I can do to get localhost working without the need for a port number? 回答1: Your EasyPHP is probably configured to listen on port 8888. You must configure EasyPHP to listen on port 80 as well. For your information, the default port for HTTP is the port 80, so when you don't give any port

Trying to write a file to a different directory using fopen()

我与影子孤独终老i 提交于 2019-12-10 04:03:09
问题 I'm trying to write a file from one directory to another. For example, http://www.xxxxxxx.com/admin/upload.php to http://www.xxxxxxx.com/posts/filename.php I've read that I cannot write a file by using the HTTP path, how do I use a local path? $ourFileName = "http://www.xxxxxxxx.com/articles/".$thefile.".php"; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); 回答1: You should use the absolute or relative path to the file on the file system. <?php $absolute_path = '/full/path

使用gdb和core dump迅速定位段错误(完)

▼魔方 西西 提交于 2019-12-10 03:35:39
使用gdb和core dump迅速定位段错误 关键字:gdb、段错误、core dump 一、什么是core dump core:内存、核心的意思; dump:抛出,扔出; core dump:前提:当某程序崩溃的一瞬间,内核会抛出当时该程序进程的内存详细情况,存储在一个名叫core.xxx(xxx为一个数字,比如core.699)的文件中。 二、更改生成的core文件的大小限制 可见,core文件是内核生成的,那某一个进程因为段错误而崩溃的时候的内存映像很大,那必然会生成一个很大的core文件,所以我们可以通过ulimit命令来设置生成core文件的大小,例如$ulimit -c unlimited,这里就是设置生成的core文件无大小限制。 三、生成core文件 当第二步完成了,就运行一次那个有问题的程序,然后自然就会因为段错误而崩溃,在当前目录下就生成了core.xxx文件。 四、分析core文件 使用命令$gdb 程序名 core.xxx,然后再输入where就可以看到产生段错误的地方。 五、实例分析 1.test.c文件的源代码 1 void do_it(); 2 int main() 3 { 4 do_it(); 5 return 0; 6 } 7 void do_it() 8 { 9 char* p = 1; //定义一个字符指针变量a,指向地址1

Permission denied when opening localhost

我与影子孤独终老i 提交于 2019-12-10 03:21:23
问题 I had recently installed Apache, PHP and MySQL in Ubuntu. And copied the files I created to the var/www directory. But when I open http://localhost it is showing Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/var/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 How can I run my project normally? It was working fine in windows. 回答1: According to this article, you need to give

how to view a site in localhost

我的梦境 提交于 2019-12-10 03:05:17
问题 I am working under localhost. In IIS Manager 7.5, windows server 2008. After adding a new application in "Application pools", I added a new asp.net web application site using that application pool. The problem is how can I run that website on localhost to check whether the site is working correctly or not? People told me that I have to add bindings "domains" for that site and run the site using those domains. But that is not convenient as every time adding a new site on IIS, I need to have a

Kafka常用命令

↘锁芯ラ 提交于 2019-12-10 02:53:51
1.topic相关 1.1 查看kafka集群的所有topic ./bin/kafka-topics.sh --list --zookeeper localhost:2181 1.2 创建名称为topic_test的topic,patitions为1个,副本为1个 .bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --patitions 1 --topic topic_test 1.3 为topic_test添加patition为10 .bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic topic_test --partitions 10 1.4 删除名称为topic_test的topic(只删除zookeeper内的元素,消失文件须手动删除) .bin/kafka-topics.sh --delete --zookeeper localhost:2181 --topic topic_test 1.5 查看topic为topic_test的详细信息 .bin/kafka-topics.sh --zookeeper localhost:2181 -describe -topic topic_test

在CentOS7上安装RabbitMQ

偶尔善良 提交于 2019-12-10 02:29:01
安装过程参考官网: Installing on RPM-based Linux (RHEL, CentOS, Fedora, openSUSE) 首先需要安装erlang,参考: http://fedoraproject.org/wiki/EPEL/FAQ#howtouse rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm yum install erlang 安装过程中会有提示,一路输入“y”即可。 完成后安装RabbitMQ: 先下载rpm: wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el7.noarch.rpm 下载完成后安装: yum install rabbitmq-server-3.6.6-1.el7.noarch.rpm 完成后启动服务: service rabbitmq-server start 可以查看服务状态: service rabbitmq-server status 这里可以看到log文件的位置,转到文件位置,打开文件: 这里显示的是没有找到配置文件,我们可以自己创建这个文件 cd /etc

es命令行用法

大兔子大兔子 提交于 2019-12-10 01:34:55
转载于:Khttps://www.ituring.com.cn/book/tupubarticle/18380 1. 索引相关操作 先查询ES集群中有哪些索引。 curl localhost:9200/_cat/indices 返回空,这时候ES刚刚创建,还没有索引数据库。我们先创建一个索引(包括类型,文档)。 curl -H "Content-Type: application/json" -XPUT localhost:9200/megacorp/employee/1?pretty -d '{ "first_name" : "John", "last_name" : "Smith", "age" : 25, "about" : "I love to go rock climbing", "interests": [ "sports", "music" ] }' 指定的新文档的主键是1,如果不知道ES会自动分配主键。?pretty让输出结果显示更美观(换行缩进方式),-d指定文档内容 再查询索引列表: curl localhost:9200/_cat/indices?v ES的数据目录里也创建了相应的文件 这里的data是ES集群的数据所在的根目录,nodes下是集群的节点列表,有多少节点就有多少个子目录,这里只有一个名称为“0”的子目录,说明nodes下只有一个节点

c# 调用 webService

泪湿孤枕 提交于 2019-12-10 01:31:16
开局几张 照着做就完事 说明下 这个wsdl 文件是根据别人提供的webService 接口 打开后改变后缀来的 这样就引用完成了 接下来就是重点了 怎么调用 localhost.WsSyncDustDataServiceImplService wsSyncDust = new localhost.WsSyncDustDataServiceImplService();//lochost 就是自己自定义的名称 var data = wsSyncDust.方法();要调用什么方法可以直接点出来 别急 还没结束 var dust = ((localhost.syncDustData)data.syncDatas[i]).dust; 这句是重点 怎么拿到集合的数据 data.syncDatas[i]这个就不多说了 前面 localhost.syncDustData 是数据转换 这样后面才能点出对应字段 我只用到这两个 其他的有啥效果的自己慢慢尝试了 告辞!!! 来源: https://www.cnblogs.com/manwwx129/p/12012742.html

Kafka教程——Kafka安装

蓝咒 提交于 2019-12-10 01:24:38
环境: JDK1.8 Kafka2.11 Centos7 zookeeper安装可以参考我另一篇博客 Kafka教程——Zookeeper安装 下载、安装Kafka wget http://mirror.bit.edu.cn/apache/kafka/2.2.1/kafka_2.11-2.2.1.tgz tar zxvf kafka_2.11-2.2.1.tgz mv kafka_2.11-2.2.1 kafka cd kafka 配置Kafka Broker的server.properties文件说明 broker.id=0 #当前机器在集群中的唯一标识,和zookeeper的myid性质一样 listeners=PLAINTEXT://192.168.40.129:9092 #服务端监听端口,如果不是集群不要打开!!! advertised.listeners=PLAINTEXT://your.host.name:9092 #broker发布给生产者消费者的监听host,如果不配置,默认使用listeners配置的信息 port=9092 #当前kafka对外提供服务的端口默认是9092 num.network.threads=3 #网络处理的线程数,一般不变 num.io.threads=8 #I/O处理线程数,一般比磁盘数大 log.dirs=/usr/local